summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2016-02-19 13:26:42 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2016-02-19 13:26:42 +0800
commitf5cc8f5d29a81da7d0f875bd4b0588df3a96ac0f (patch)
tree22200170eedd405d6bc47db668b56f9fcc561664
parent7e7067785ce0c0352c32f6d60cb6e011b912f984 (diff)
downloadgobject-introspection-f5cc8f5d29a81da7d0f875bd4b0588df3a96ac0f.tar.gz
giscanner/msvccompiler.py: Fix exception handling
Fix the syntax where we handle the exception during preprocessing, so that we won't trigger a NameError when preprocessing fails, and so the error would become clearer to people. Reported by Cosimo Lupo. https://bugzilla.gnome.org/show_bug.cgi?id=757126
-rw-r--r--giscanner/msvccompiler.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/giscanner/msvccompiler.py b/giscanner/msvccompiler.py
index d5785775..86049dad 100644
--- a/giscanner/msvccompiler.py
+++ b/giscanner/msvccompiler.py
@@ -80,7 +80,7 @@ class MSVCCompiler(distutils.msvccompiler.MSVCCompiler):
if self.force or output_file is None or newer(source, output_file):
try:
self.spawn(cpp_args)
- except (DistutilsExecError, msg):
+ except DistutilsExecError as msg:
print(msg)
raise CompileError