Fixed an issue in the versions file downloader. 5_1_x

Wed, 05 Oct 2011 19:24:25 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 05 Oct 2011 19:24:25 +0200
branch
5_1_x
changeset 1359
97dc4ee2d655
parent 1355
6e6c60020291
child 1361
39631c724b05

Fixed an issue in the versions file downloader.

UI/UserInterface.py file | annotate | diff | comparison | revisions
--- a/UI/UserInterface.py	Mon Oct 03 16:05:01 2011 +0200
+++ b/UI/UserInterface.py	Wed Oct 05 19:24:25 2011 +0200
@@ -5486,7 +5486,9 @@
         if reply.error() == QNetworkReply.NoError:
             ioEncoding = Preferences.getSystem("IOEncoding")
             versions = str(reply.readAll(), ioEncoding, 'replace').splitlines()
-        if reply.error() != QNetworkReply.NoError or versions[0].startswith("<"):
+        if reply.error() != QNetworkReply.NoError or \
+           len(versions) == 0 or \
+           versions[0].startswith("<"):
             # network error or an error page
             self.httpAlternative += 1
             if self.httpAlternative >= len(self.__httpAlternatives):

eric ide

mercurial