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:
parent
1aafff0395
commit
05eb78ccac
|
@ -93,9 +93,10 @@ def check_output(cmd):
|
|||
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: ""
|
||||
if enc != None: return out.decode(enc).rstrip('\r\n')
|
||||
else: return out.rstrip('\r\n')
|
||||
else:
|
||||
return ""
|
||||
|
||||
def git_hash():
|
||||
try:
|
||||
|
|
|
@ -98,9 +98,10 @@ else:
|
|||
def _to_pystr(s):
|
||||
if s != None:
|
||||
enc = sys.stdout.encoding
|
||||
if enc != None: s.decode(enc)
|
||||
else: s
|
||||
else: ""
|
||||
if enc != None: return s.decode(enc)
|
||||
else: return s
|
||||
else:
|
||||
return ""
|
||||
|
||||
def init(PATH):
|
||||
global _lib
|
||||
|
|
Loading…
Reference in a new issue