14 import io |
14 import io |
15 |
15 |
16 from PyQt4.QtGui import * |
16 from PyQt4.QtGui import * |
17 from PyQt4.QtCore import * |
17 from PyQt4.QtCore import * |
18 from PyQt4.QtNetwork import QNetworkAccessManager, QNetworkRequest, QNetworkReply |
18 from PyQt4.QtNetwork import QNetworkAccessManager, QNetworkRequest, QNetworkReply |
|
19 try: |
|
20 from PyQt4.QtNetwork import QSslError # __IGNORE_WARNING__ |
|
21 SSL_AVAILABLE = True |
|
22 except ImportError: |
|
23 SSL_AVAILABLE = False |
19 |
24 |
20 from .Ui_PluginRepositoryDialog import Ui_PluginRepositoryDialog |
25 from .Ui_PluginRepositoryDialog import Ui_PluginRepositoryDialog |
21 |
26 |
22 from UI.AuthenticationDialog import AuthenticationDialog |
27 from UI.AuthenticationDialog import AuthenticationDialog |
23 |
28 |
75 # attributes for the network objects |
80 # attributes for the network objects |
76 self.__networkManager = QNetworkAccessManager(self) |
81 self.__networkManager = QNetworkAccessManager(self) |
77 self.connect(self.__networkManager, |
82 self.connect(self.__networkManager, |
78 SIGNAL('proxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*)'), |
83 SIGNAL('proxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*)'), |
79 self.__proxyAuthenticationRequired) |
84 self.__proxyAuthenticationRequired) |
80 self.connect(self.__networkManager, |
85 if SSL_AVAILABLE: |
81 SIGNAL('sslErrors(QNetworkReply *, const QList<QSslError> &)'), |
86 self.connect(self.__networkManager, |
82 self.__sslErrors) |
87 SIGNAL('sslErrors(QNetworkReply *, const QList<QSslError> &)'), |
|
88 self.__sslErrors) |
83 self.__replies = [] |
89 self.__replies = [] |
84 |
90 |
85 self.__doneMethod = None |
91 self.__doneMethod = None |
86 self.__inDownload = False |
92 self.__inDownload = False |
87 self.__pluginsToDownload = [] |
93 self.__pluginsToDownload = [] |