Fixed an issue with Qt installations that don't support SSL and suppressed some py3flakes warnings. 5_0_x

Sat, 01 Jan 2011 19:24:20 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 01 Jan 2011 19:24:20 +0100
branch
5_0_x
changeset 797
689608661eed
parent 792
a13346916170
child 799
587a1bdc5181

Fixed an issue with Qt installations that don't support SSL and suppressed some py3flakes warnings.

Helpviewer/Network/NetworkAccessManagerProxy.py file | annotate | diff | comparison | revisions
IconEditor/IconEditorGrid.py file | annotate | diff | comparison | revisions
PluginManager/PluginRepositoryDialog.py file | annotate | diff | comparison | revisions
Plugins/PluginVcsPySvn.py file | annotate | diff | comparison | revisions
UI/UserInterface.py file | annotate | diff | comparison | revisions
Utilities/uic.py file | annotate | diff | comparison | revisions
compileUiFiles.py file | annotate | diff | comparison | revisions
eric5-configure.py file | annotate | diff | comparison | revisions
eric5-editor.py file | annotate | diff | comparison | revisions
eric5-webbrowser.py file | annotate | diff | comparison | revisions
eric5.py file | annotate | diff | comparison | revisions
install.py file | annotate | diff | comparison | revisions
--- a/Helpviewer/Network/NetworkAccessManagerProxy.py	Fri Dec 31 15:50:33 2010 +0100
+++ b/Helpviewer/Network/NetworkAccessManagerProxy.py	Sat Jan 01 19:24:20 2011 +0100
@@ -9,6 +9,11 @@
 
 from PyQt4.QtCore import SIGNAL
 from PyQt4.QtNetwork import QNetworkAccessManager, QNetworkRequest
+try:
+    from PyQt4.QtNetwork import QSslError   # __IGNORE_WARNING__
+    SSL_AVAILABLE = True
+except ImportError:
+    SSL_AVAILABLE = False
 
 class NetworkAccessManagerProxy(QNetworkAccessManager):
     """
@@ -48,10 +53,11 @@
         # do not steal ownership
         self.cookieJar().setParent(self.__class__.primaryManager)
         
-        self.connect(self, 
-            SIGNAL('sslErrors(QNetworkReply *, const QList<QSslError> &)'), 
-            self.__class__.primaryManager, 
-            SIGNAL('sslErrors(QNetworkReply *, const QList<QSslError> &)'))
+        if SSL_AVAILABLE:
+            self.connect(self, 
+                SIGNAL('sslErrors(QNetworkReply *, const QList<QSslError> &)'), 
+                self.__class__.primaryManager, 
+                SIGNAL('sslErrors(QNetworkReply *, const QList<QSslError> &)'))
         self.connect(self, 
             SIGNAL('proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *)'),
             self.__class__.primaryManager, 
--- a/IconEditor/IconEditorGrid.py	Fri Dec 31 15:50:33 2010 +0100
+++ b/IconEditor/IconEditorGrid.py	Sat Jan 01 19:24:20 2011 +0100
@@ -10,7 +10,7 @@
 from PyQt4.QtCore import *
 from PyQt4.QtGui import *
 
-from .cursors import cursors_rc
+from .cursors import cursors_rc     # __IGNORE_WARNING__
 
 from .IconSizeDialog import IconSizeDialog
 
--- a/PluginManager/PluginRepositoryDialog.py	Fri Dec 31 15:50:33 2010 +0100
+++ b/PluginManager/PluginRepositoryDialog.py	Sat Jan 01 19:24:20 2011 +0100
@@ -16,6 +16,11 @@
 from PyQt4.QtGui import *
 from PyQt4.QtCore import *
 from PyQt4.QtNetwork import QNetworkAccessManager, QNetworkRequest, QNetworkReply
+try:
+    from PyQt4.QtNetwork import QSslError   # __IGNORE_WARNING__
+    SSL_AVAILABLE = True
+except ImportError:
+    SSL_AVAILABLE = False
 
 from .Ui_PluginRepositoryDialog import Ui_PluginRepositoryDialog
 
@@ -77,9 +82,10 @@
         self.connect(self.__networkManager, 
             SIGNAL('proxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*)'),
             self.__proxyAuthenticationRequired)
-        self.connect(self.__networkManager, 
-            SIGNAL('sslErrors(QNetworkReply *, const QList<QSslError> &)'), 
-            self.__sslErrors)
+        if SSL_AVAILABLE:
+            self.connect(self.__networkManager, 
+                SIGNAL('sslErrors(QNetworkReply *, const QList<QSslError> &)'), 
+                self.__sslErrors)
         self.__replies = []
         
         self.__doneMethod = None
--- a/Plugins/PluginVcsPySvn.py	Fri Dec 31 15:50:33 2010 +0100
+++ b/Plugins/PluginVcsPySvn.py	Sat Jan 01 19:24:20 2011 +0100
@@ -72,7 +72,7 @@
     global pluginTypename
     data = {}
     try:
-        import pysvn
+        import pysvn        # __IGNORE_WARNING__
         data[".svn"] = (pluginTypename, displayString())
         data["_svn"] = (pluginTypename, displayString())
     except ImportError:
@@ -86,7 +86,7 @@
     @return display string (string)
     """
     try:
-        import pysvn
+        import pysvn        # __IGNORE_WARNING__
         return QApplication.translate('VcsPySvnPlugin', 'Subversion (pysvn)')
     except ImportError:
         return ""
--- a/UI/UserInterface.py	Fri Dec 31 15:50:33 2010 +0100
+++ b/UI/UserInterface.py	Sat Jan 01 19:24:20 2011 +0100
@@ -17,6 +17,11 @@
 from PyQt4.Qsci import QSCINTILLA_VERSION_STR
 from PyQt4.QtNetwork import QNetworkProxyFactory, QNetworkAccessManager, \
     QNetworkRequest, QNetworkReply
+try:
+    from PyQt4.QtNetwork import QSslError   # __IGNORE_WARNING__
+    SSL_AVAILABLE = True
+except ImportError:
+    SSL_AVAILABLE = False
 
 from E5Gui.E5Application import e5App
 
@@ -620,9 +625,10 @@
         self.connect(self.__networkManager, 
             SIGNAL('proxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*)'),
             self.__proxyAuthenticationRequired)
-        self.connect(self.__networkManager, 
-                SIGNAL('sslErrors(QNetworkReply *, const QList<QSslError> &)'), 
-            self.__sslErrors)
+        if SSL_AVAILABLE:
+            self.connect(self.__networkManager, 
+                    SIGNAL('sslErrors(QNetworkReply *, const QList<QSslError> &)'), 
+                self.__sslErrors)
         self.__replies = []
         
         # attribute for the help window
--- a/Utilities/uic.py	Fri Dec 31 15:50:33 2010 +0100
+++ b/Utilities/uic.py	Sat Jan 01 19:24:20 2011 +0100
@@ -22,7 +22,8 @@
     except ImportError:
         from PyQt4.uic import compileUi
         
-        def compileUiDir(dir, recurse = False, map = None, **compileUi_args):
+        def compileUiDir(dir, recurse = False, map = None,  # __IGNORE_WARNING__
+            **compileUi_args):
             """
             Creates Python modules from Qt Designer .ui files in a directory or
             directory tree.
--- a/compileUiFiles.py	Fri Dec 31 15:50:33 2010 +0100
+++ b/compileUiFiles.py	Sat Jan 01 19:24:20 2011 +0100
@@ -20,7 +20,8 @@
     except ImportError:
         from PyQt4.uic import compileUi
         
-        def compileUiDir(dir, recurse = False, map = None, **compileUi_args):
+        def compileUiDir(dir, recurse = False, map = None,  # __IGNORE_WARNING__
+            **compileUi_args):
             """
             Creates Python modules from Qt Designer .ui files in a directory or
             directory tree.
@@ -115,4 +116,4 @@
         print("""An internal error occured.  Please report all the output of the program,
 including the following traceback, to eric5-bugs@eric-ide.python-projects.org.
 """)
-        raise
\ No newline at end of file
+        raise
--- a/eric5-configure.py	Fri Dec 31 15:50:33 2010 +0100
+++ b/eric5-configure.py	Sat Jan 01 19:24:20 2011 +0100
@@ -23,7 +23,7 @@
 
 # make ThirdParty package available as a packages repository
 try:
-    import pygments
+    import pygments     # __IGNORE_WARNING__
 except ImportError:
     sys.path.insert(2, os.path.join(os.path.dirname(__file__), "ThirdParty", "Pygments"))
 
--- a/eric5-editor.py	Fri Dec 31 15:50:33 2010 +0100
+++ b/eric5-editor.py	Sat Jan 01 19:24:20 2011 +0100
@@ -25,7 +25,7 @@
 
 # make ThirdParty package available as a packages repository
 try:
-    import pygments
+    import pygments     # __IGNORE_WARNING__
 except ImportError:
     sys.path.insert(2, os.path.join(os.path.dirname(__file__), "ThirdParty", "Pygments"))
 
@@ -65,4 +65,4 @@
     sys.exit(res)
 
 if __name__ == '__main__':
-    main()
\ No newline at end of file
+    main()
--- a/eric5-webbrowser.py	Fri Dec 31 15:50:33 2010 +0100
+++ b/eric5-webbrowser.py	Sat Jan 01 19:24:20 2011 +0100
@@ -25,7 +25,7 @@
 
 # make ThirdParty package available as a packages repository
 try:
-    import pygments
+    import pygments     # __IGNORE_WARNING__
 except ImportError:
     sys.path.insert(2, os.path.join(os.path.dirname(__file__), "ThirdParty", "Pygments"))
 
--- a/eric5.py	Fri Dec 31 15:50:33 2010 +0100
+++ b/eric5.py	Sat Jan 01 19:24:20 2011 +0100
@@ -45,7 +45,7 @@
 
 # make Third-Party package available as a packages repository
 try:
-    import pygments
+    import pygments     # __IGNORE_WARNING__
 except ImportError:
     sys.path.insert(2, os.path.join(os.path.dirname(__file__), "ThirdParty", "Pygments"))
 
--- a/install.py	Fri Dec 31 15:50:33 2010 +0100
+++ b/install.py	Sat Jan 01 19:24:20 2011 +0100
@@ -565,7 +565,7 @@
     print("Found PyQt")
     
     try:
-        from PyQt4 import Qsci
+        from PyQt4 import Qsci      # __IGNORE_WARNING__
     except ImportError as msg:
         print("Sorry, please install QScintilla2 and")
         print("it's PyQt4 wrapper.")
@@ -656,7 +656,8 @@
     except ImportError:
         from PyQt4.uic import compileUi
         
-        def compileUiDir(dir, recurse = False, map = None, **compileUi_args):
+        def compileUiDir(dir, recurse = False, map = None,  # __IGNORE_WARNING__
+            **compileUi_args):
             """
             Creates Python modules from Qt Designer .ui files in a directory or
             directory tree.

eric ide

mercurial