From f5cc8f5d29a81da7d0f875bd4b0588df3a96ac0f Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Fri, 19 Feb 2016 13:26:42 +0800 Subject: 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 --- giscanner/msvccompiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.1