3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-06 22:23:22 +00:00

fix for string decoding in build scripts

This commit is contained in:
Christoph M. Wintersteiger 2015-11-14 15:42:49 +00:00
parent 1aafff0395
commit 05eb78ccac
2 changed files with 8 additions and 6 deletions

View file

@ -93,9 +93,10 @@ def check_output(cmd):
out = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0] out = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
if out != None: if out != None:
enc = sys.stdout.encoding enc = sys.stdout.encoding
if enc != None: out.decode(enc).rstrip('\r\n') if enc != None: return out.decode(enc).rstrip('\r\n')
else: out.rstrip('\r\n') else: return out.rstrip('\r\n')
else: "" else:
return ""
def git_hash(): def git_hash():
try: try:

View file

@ -98,9 +98,10 @@ else:
def _to_pystr(s): def _to_pystr(s):
if s != None: if s != None:
enc = sys.stdout.encoding enc = sys.stdout.encoding
if enc != None: s.decode(enc) if enc != None: return s.decode(enc)
else: s else: return s
else: "" else:
return ""
def init(PATH): def init(PATH):
global _lib global _lib