From acd6ab685b9ce0cb77d482a3c7e0ff693ed47231 Mon Sep 17 00:00:00 2001 From: Ilan Schnell Date: Sat, 16 Feb 2013 19:20:06 -0600 Subject: [PATCH] enhance setup error messages --- llvm-config-win32.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm-config-win32.py b/llvm-config-win32.py index 96cc867..9d3915a 100644 --- a/llvm-config-win32.py +++ b/llvm-config-win32.py @@ -26,7 +26,7 @@ def get_llvm_version(): p = Popen(args, stdout=PIPE, stderr=PIPE) stdout, stderr = p.communicate() if stderr: - raise Exception("%r stderr is:\n%s" % (args, stderr.decode())) + sys.exit("Error: %r stderr is:\n%s" % (args, stderr.decode())) out = stdout.decode().strip() pat = re.compile(r'llvm\s+version\s+(\d+\.\d+\S*)', re.I) m = pat.search(out) @@ -111,7 +111,7 @@ def main(): print(libdir) else: - sys.exit('Unrecognized llvm-config option %r' % option) + sys.exit('Error: Unrecognized llvm-config option %r' % option) if __name__ == '__main__':