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

feat(error): Show SyntaxError found in frappe (#759)

This commit is contained in:
Aditya Hase 2019-01-19 13:12:21 +05:30 committed by Faris Ansari
parent 518b8f32da
commit 1497f9b14b
2 changed files with 4 additions and 2 deletions

View File

@ -98,7 +98,9 @@ def get_frappe_commands(bench_path='.'):
output = get_cmd_output("{python} -m frappe.utils.bench_helper get-frappe-commands".format(python=python), cwd=sites_path)
# output = output.decode('utf-8')
return json.loads(output)
except subprocess.CalledProcessError:
except subprocess.CalledProcessError as e:
if e.stderr:
print(e.stderr.decode('utf-8'))
return []
def get_frappe_help(bench_path='.'):

View File

@ -359,7 +359,7 @@ def check_git_for_shallow_clone():
def get_cmd_output(cmd, cwd='.'):
try:
output = subprocess.check_output(cmd, cwd=cwd, shell=True, stderr=open(os.devnull, 'wb')).strip()
output = subprocess.check_output(cmd, cwd=cwd, shell=True, stderr=subprocess.PIPE).strip()
output = output.decode('utf-8')
return output
except subprocess.CalledProcessError as e: