From d1810e1dc1849daabace392c55b39057c09e98b9 Mon Sep 17 00:00:00 2001 From: Aditya Hase Date: Mon, 21 Jan 2019 16:11:10 +0530 Subject: [PATCH] fix(error): Python 2 does not provide stderr on CalledProcessError (#762) --- bench/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bench/cli.py b/bench/cli.py index 7ac353df..fd419d00 100755 --- a/bench/cli.py +++ b/bench/cli.py @@ -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 []