UI/UserInterface.py

branch
5_1_x
changeset 1359
97dc4ee2d655
parent 1218
825a24cf43f7
child 1485
b0d0ddac7012
--- 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