Fixed an issue in the network proxy factory class.

Mon, 31 May 2010 15:15:20 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 31 May 2010 15:15:20 +0200
changeset 317
f6b0163a21be
parent 316
b7e499650928
child 319
09f456ec6fcf

Fixed an issue in the network proxy factory class.

E5Network/E5NetworkProxyFactory.py file | annotate | diff | comparison | revisions
--- a/E5Network/E5NetworkProxyFactory.py	Sun May 30 19:50:57 2010 +0200
+++ b/E5Network/E5NetworkProxyFactory.py	Mon May 31 15:15:20 2010 +0200
@@ -105,14 +105,15 @@
                                                   url.userName(), url.password())
                             proxyList = [proxy]
                             break
-                scheme = schemeFromProxyType(proxyList[0].type())
-                if scheme == "":
-                    scheme = "Http"
-                if scheme != "NoProxy":
-                    proxyList[0].setUser(
-                        Preferences.getUI("ProxyUser/{0}".format(scheme)))
-                    proxyList[0].setPassword(
-                        Preferences.getUI("ProxyPassword/{0}".format(scheme)))
+                if proxyList:
+                    scheme = schemeFromProxyType(proxyList[0].type())
+                    if scheme == "":
+                        scheme = "Http"
+                    if scheme != "NoProxy":
+                        proxyList[0].setUser(
+                            Preferences.getUI("ProxyUser/{0}".format(scheme)))
+                        proxyList[0].setPassword(
+                            Preferences.getUI("ProxyPassword/{0}".format(scheme)))
                 return proxyList
             else:
                 if Preferences.getUI("UseHttpProxyForAll"):

eric ide

mercurial