[gobject-introspection] giscanner/dumper.py: Fix for Python 3.x for MSVC 2010+



commit 3bb86dedb9c2fc6352d240ea03532133b75b5f58
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Wed Oct 28 16:24:09 2015 +0800

    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

 giscanner/dumper.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/giscanner/dumper.py b/giscanner/dumper.py
index f9c2a43..3f72159 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)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]