stub should also open stdout in binary mode

pull/260/head
Lex Neva 2018-08-03 22:39:52 -04:00
rodzic 782b5efc71
commit 89e5e5c9db
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -33,6 +33,10 @@ args[0] = binary_path
extension = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout, stderr = extension.communicate()
if sys.platform == "win32":
import msvcrt
msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
stdout = stdout.strip()
if stdout:
print stdout.strip(),