[gobject-introspection] giscanner/msvccompiler.py: Fix exception handling
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] giscanner/msvccompiler.py: Fix exception handling
- Date: Fri, 19 Feb 2016 06:04:42 +0000 (UTC)
commit f5cc8f5d29a81da7d0f875bd4b0588df3a96ac0f
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Fri Feb 19 13:26:42 2016 +0800
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 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/giscanner/msvccompiler.py b/giscanner/msvccompiler.py
index d578577..86049da 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]