summaryrefslogtreecommitdiff
path: root/giscanner
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2015-10-28 16:24:09 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2015-10-28 22:05:18 +0800
commit3bb86dedb9c2fc6352d240ea03532133b75b5f58 (patch)
tree81e7e1ef2bf6d4ca61ad752cc7b1369299fd5e92 /giscanner
parentee28491dec8b34e60e5e8278c769929adeed05ed (diff)
downloadgobject-introspection-3bb86dedb9c2fc6352d240ea03532133b75b5f58.tar.gz
giscanner/dumper.py: Fix for Python 3.x for MSVC 2010+
sys.exc_clear(), which was called when we need to ignore the error when we can't embed manifests to the dumper program on MSVC 2010 and later, is only available/needed for Python 2.7.x, so only use it there. https://bugzilla.gnome.org/show_bug.cgi?id=757126
Diffstat (limited to 'giscanner')
-rw-r--r--giscanner/dumper.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/giscanner/dumper.py b/giscanner/dumper.py
index f9c2a434..3f721598 100644
--- a/giscanner/dumper.py
+++ b/giscanner/dumper.py
@@ -287,7 +287,8 @@ class DumpCompiler(object):
msg = str(e)
if msg[msg.rfind('mt.exe'):] == 'mt.exe\' failed with exit status 31':
- sys.exc_clear()
+ if sys.version_info < (3, 0):
+ sys.exc_clear()
pass
else:
raise LinkError(e)