1146 """<p>Could not download the requested file""" |
1146 """<p>Could not download the requested file""" |
1147 """ from {0}.</p><p>Error: {1}</p>""" |
1147 """ from {0}.</p><p>Error: {1}</p>""" |
1148 ).format(Preferences.getUI("PluginRepositoryUrl6"), |
1148 ).format(Preferences.getUI("PluginRepositoryUrl6"), |
1149 reply.errorString()) |
1149 reply.errorString()) |
1150 ) |
1150 ) |
|
1151 reply.deleteLater() |
1151 return |
1152 return |
1152 |
1153 |
1153 ioDevice = QFile(self.pluginRepositoryFile + ".tmp") |
1154 ioDevice = QFile(self.pluginRepositoryFile + ".tmp") |
1154 ioDevice.open(QIODevice.WriteOnly) |
1155 ioDevice.open(QIODevice.WriteOnly) |
1155 ioDevice.write(reply.readAll()) |
1156 ioDevice.write(reply.readAll()) |
1156 ioDevice.close() |
1157 ioDevice.close() |
1157 if QFile.exists(self.pluginRepositoryFile): |
1158 if QFile.exists(self.pluginRepositoryFile): |
1158 QFile.remove(self.pluginRepositoryFile) |
1159 QFile.remove(self.pluginRepositoryFile) |
1159 ioDevice.rename(self.pluginRepositoryFile) |
1160 ioDevice.rename(self.pluginRepositoryFile) |
|
1161 reply.deleteLater() |
1160 |
1162 |
1161 if os.path.exists(self.pluginRepositoryFile): |
1163 if os.path.exists(self.pluginRepositoryFile): |
1162 f = QFile(self.pluginRepositoryFile) |
1164 f = QFile(self.pluginRepositoryFile) |
1163 if f.open(QIODevice.ReadOnly): |
1165 if f.open(QIODevice.ReadOnly): |
1164 # save current URL |
1166 # save current URL |