From f12d853b98b638b1a65cd27eddf2fb06e6540249 Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Wed, 28 Oct 2015 16:10:24 +0800 Subject: giscanner/msvccompiler.py: Make it compatible with Python 3.x This is checked for Python 2.7.x compatibility as well. https://bugzilla.gnome.org/show_bug.cgi?id=757126 --- giscanner/msvccompiler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'giscanner/msvccompiler.py') diff --git a/giscanner/msvccompiler.py b/giscanner/msvccompiler.py index 63248093..d5785775 100644 --- a/giscanner/msvccompiler.py +++ b/giscanner/msvccompiler.py @@ -80,8 +80,8 @@ 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: - print msg + except (DistutilsExecError, msg): + print(msg) raise CompileError # The /P option for the MSVC preprocessor will output the results -- cgit v1.2.1