PluginManager/PluginManager.py

changeset 3676
2f62b060a931
parent 3670
f0cb7579c0b4
child 4021
195a471c327b
equal deleted inserted replaced
3675:aa48d3e9b008 3676:2f62b060a931
1092 return 1092 return
1093 1093
1094 self.__updateAvailable = False 1094 self.__updateAvailable = False
1095 1095
1096 request = QNetworkRequest( 1096 request = QNetworkRequest(
1097 QUrl(Preferences.getUI("PluginRepositoryUrl5"))) 1097 QUrl(Preferences.getUI("PluginRepositoryUrl6")))
1098 request.setAttribute(QNetworkRequest.CacheLoadControlAttribute, 1098 request.setAttribute(QNetworkRequest.CacheLoadControlAttribute,
1099 QNetworkRequest.AlwaysNetwork) 1099 QNetworkRequest.AlwaysNetwork)
1100 reply = self.__networkManager.get(request) 1100 reply = self.__networkManager.get(request)
1101 reply.finished.connect(self.__downloadRepositoryFileDone) 1101 reply.finished.connect(self.__downloadRepositoryFileDone)
1102 self.__replies.append(reply) 1102 self.__replies.append(reply)
1113 None, 1113 None,
1114 self.tr("Error downloading file"), 1114 self.tr("Error downloading file"),
1115 self.tr( 1115 self.tr(
1116 """<p>Could not download the requested file""" 1116 """<p>Could not download the requested file"""
1117 """ from {0}.</p><p>Error: {1}</p>""" 1117 """ from {0}.</p><p>Error: {1}</p>"""
1118 ).format(Preferences.getUI("PluginRepositoryUrl5"), 1118 ).format(Preferences.getUI("PluginRepositoryUrl6"),
1119 reply.errorString()) 1119 reply.errorString())
1120 ) 1120 )
1121 return 1121 return
1122 1122
1123 ioDevice = QFile(self.pluginRepositoryFile + ".tmp") 1123 ioDevice = QFile(self.pluginRepositoryFile + ".tmp")
1130 1130
1131 if os.path.exists(self.pluginRepositoryFile): 1131 if os.path.exists(self.pluginRepositoryFile):
1132 f = QFile(self.pluginRepositoryFile) 1132 f = QFile(self.pluginRepositoryFile)
1133 if f.open(QIODevice.ReadOnly): 1133 if f.open(QIODevice.ReadOnly):
1134 # save current URL 1134 # save current URL
1135 url = Preferences.getUI("PluginRepositoryUrl5") 1135 url = Preferences.getUI("PluginRepositoryUrl6")
1136 1136
1137 # read the repository file 1137 # read the repository file
1138 from E5XML.PluginRepositoryReader import PluginRepositoryReader 1138 from E5XML.PluginRepositoryReader import PluginRepositoryReader
1139 reader = PluginRepositoryReader(f, self.checkPluginEntry) 1139 reader = PluginRepositoryReader(f, self.checkPluginEntry)
1140 reader.readXML() 1140 reader.readXML()
1141 if url != Preferences.getUI("PluginRepositoryUrl5"): 1141 if url != Preferences.getUI("PluginRepositoryUrl6"):
1142 # redo if it is a redirect 1142 # redo if it is a redirect
1143 self.checkPluginUpdatesAvailable() 1143 self.checkPluginUpdatesAvailable()
1144 return 1144 return
1145 1145
1146 if self.__updateAvailable: 1146 if self.__updateAvailable:

eric ide

mercurial