diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2015-10-28 16:24:09 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2015-10-28 22:05:18 +0800 |
commit | 3bb86dedb9c2fc6352d240ea03532133b75b5f58 (patch) | |
tree | 81e7e1ef2bf6d4ca61ad752cc7b1369299fd5e92 /giscanner | |
parent | ee28491dec8b34e60e5e8278c769929adeed05ed (diff) | |
download | gobject-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.py | 3 |
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) |