build_binaries.py: Python3 fix

Something in the program output is not ascii
This commit is contained in:
Peter Barker 2020-08-27 22:34:29 +10:00 committed by Peter Barker
parent a4e7c72635
commit 119462aeb1

View File

@ -14,6 +14,7 @@ import os
import re
import shutil
import time
import string
import subprocess
import sys
import gzip
@ -84,7 +85,9 @@ class build_binaries(object):
time.sleep(0.1)
continue
if running_python3:
x = x.decode('ascii')
x = bytearray(x)
x = filter(lambda x : chr(x) in string.printable, x)
x = "".join([chr(c) for c in x])
output += x
x = x.rstrip()
if show_output: