2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-12 00:06:36 +00:00

fix(error): Python 2 does not provide stderr on CalledProcessError (#762)

This commit is contained in:
Aditya Hase 2019-01-21 16:11:10 +05:30 committed by Faris Ansari
parent 5ab2da3d39
commit d1810e1dc1

View File

@ -99,7 +99,7 @@ def get_frappe_commands(bench_path='.'):
# output = output.decode('utf-8')
return json.loads(output)
except subprocess.CalledProcessError as e:
if e.stderr:
if hasattr(e, "stderr"):
print(e.stderr.decode('utf-8'))
return []