From faf6614d60fc039a124f658babbd1daffe790921 Mon Sep 17 00:00:00 2001 From: practicalswift Date: Tue, 8 Mar 2016 16:02:53 +0100 Subject: [PATCH] [Python] Fix AttributeError: CalledProcessError.strerror does not exist --- utils/SwiftBuildSupport.py | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/utils/SwiftBuildSupport.py b/utils/SwiftBuildSupport.py index d13f552ae4935..2509b1a77ab12 100644 --- a/utils/SwiftBuildSupport.py +++ b/utils/SwiftBuildSupport.py @@ -78,12 +78,9 @@ def check_call(args, print_command=False, verbose=False): try: return subprocess.check_call(args) except subprocess.CalledProcessError as e: - if verbose: - print_with_argv0(e.strerror) - else: - print_with_argv0( - "command terminated with a non-zero exit status " + - str(e.returncode) + ", aborting") + print_with_argv0( + "command terminated with a non-zero exit status " + + str(e.returncode) + ", aborting") sys.stdout.flush() sys.exit(1) except OSError as e: @@ -99,12 +96,9 @@ def check_output(args, print_command=False, verbose=False): try: return subprocess.check_output(args) except subprocess.CalledProcessError as e: - if verbose: - print_with_argv0(e.strerror) - else: - print_with_argv0( - "command terminated with a non-zero exit status " + - str(e.returncode) + ", aborting") + print_with_argv0( + "command terminated with a non-zero exit status " + + str(e.returncode) + ", aborting") sys.stdout.flush() sys.exit(1) except OSError as e: