Fixed some places that still were using the non-existing sipconfig module.

Fri, 06 Jan 2017 18:22:02 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 06 Jan 2017 18:22:02 +0100
changeset 5400
5cdca61d8cd8
parent 5399
c11721fa3c17
child 5401
dbbbd94aec0b

Fixed some places that still were using the non-existing sipconfig module.

Globals/__init__.py file | annotate | diff | comparison | revisions
Tools/TrayStarter.py file | annotate | diff | comparison | revisions
UI/UserInterface.py file | annotate | diff | comparison | revisions
--- a/Globals/__init__.py	Fri Jan 06 17:19:38 2017 +0100
+++ b/Globals/__init__.py	Fri Jan 06 18:22:02 2017 +0100
@@ -79,8 +79,9 @@
     
     # check version of sip
     try:
-        import sipconfig
-        sipVersion = sipconfig.Configuration().sip_version_str
+        import sip
+        sip_version_str = sip.SIP_VERSION_STR
+    except (ImportError, AttributeError):
         # always assume, that snapshots are good
         if "snapshot" not in sipVersion:
             # check for blacklisted versions
@@ -91,8 +92,6 @@
                         .format(vers))
                     print('Please install another version.')
                     return False
-    except ImportError:
-        pass
     
     # check version of PyQt
     from PyQt5.QtCore import PYQT_VERSION_STR
--- a/Tools/TrayStarter.py	Fri Jan 06 17:19:38 2017 +0100
+++ b/Tools/TrayStarter.py	Fri Jan 06 18:22:02 2017 +0100
@@ -506,9 +506,9 @@
         from PyQt5.Qsci import QSCINTILLA_VERSION_STR
         
         try:
-            import sipconfig
-            sip_version_str = sipconfig.Configuration().sip_version_str
-        except ImportError:
+            import sip
+            sip_version_str = sip.SIP_VERSION_STR
+        except (ImportError, AttributeError):
             sip_version_str = "sip version not available"
         
         versionText = self.tr(
--- a/UI/UserInterface.py	Fri Jan 06 17:19:38 2017 +0100
+++ b/UI/UserInterface.py	Fri Jan 06 18:22:02 2017 +0100
@@ -3086,9 +3086,9 @@
         Private slot to handle the Versions dialog.
         """
         try:
-            import sipconfig
-            sip_version_str = sipconfig.Configuration().sip_version_str
-        except ImportError:
+            import sip
+            sip_version_str = sip.SIP_VERSION_STR
+        except (ImportError, AttributeError):
             sip_version_str = "sip version not available"
         
         versionText = self.tr(

eric ide

mercurial