3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-08 02:15:19 +00:00

fix for string decoding in build scripts

This commit is contained in:
Christoph M. Wintersteiger 2015-11-14 15:06:55 +00:00
parent 2277a52d80
commit 639dfc4b30
2 changed files with 11 additions and 2 deletions

View file

@ -90,7 +90,12 @@ FPMATH="Default"
FPMATH_FLAGS="-mfpmath=sse -msse -msse2"
def check_output(cmd):
return (subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]).decode(sys.stdout.encoding).rstrip('\r\n')
out = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
if out != None:
enc = sys.stdout.encoding
if enc != None: out.decode(enc).rstrip('\r\n')
else: out.rstrip('\r\n')
else: ""
def git_hash():
try:

View file

@ -96,7 +96,11 @@ if sys.version < '3':
return s
else:
def _to_pystr(s):
return s.decode(sys.stdout.encoding)
if s != None:
enc = sys.stdout.encoding
if enc != None: s.decode(enc)
else: s
else: ""
def init(PATH):
global _lib