Fixed the the way proxy settings is sent to eveapi
This commit is contained in:
@@ -125,8 +125,9 @@ class PFGlobalPref ( PreferenceView):
|
||||
|
||||
proxy = self.proxySettings.autodetect()
|
||||
|
||||
if proxy:
|
||||
txt = proxy
|
||||
if proxy is not None:
|
||||
addr,port = proxy
|
||||
txt = addr + ":" + str(port)
|
||||
else:
|
||||
txt = "None"
|
||||
|
||||
|
||||
@@ -117,10 +117,10 @@ class Character():
|
||||
ps = service.settings.ProxySettings.getInstance()
|
||||
if ps.getMode() == 0:
|
||||
return None
|
||||
elif ps.getMode() == 1:
|
||||
if ps.getMode() == 1:
|
||||
return ps.autodetect()
|
||||
elif ps.getMode == 2:
|
||||
return ps.getAddress() + ps.getPort()
|
||||
if ps.getMode() == 2:
|
||||
return (ps.getAddress(), int(ps.getPort()))
|
||||
|
||||
|
||||
def charList(self, charID, userID, apiKey):
|
||||
|
||||
@@ -156,7 +156,7 @@ class ProxySettings():
|
||||
proxydict = urllib2.ProxyHandler().proxies
|
||||
txt = "Auto-detected: "
|
||||
|
||||
validPrefixes = ("https", "http")
|
||||
validPrefixes = ("http", "https")
|
||||
|
||||
for prefix in validPrefixes:
|
||||
if not prefix in proxydict:
|
||||
@@ -166,8 +166,8 @@ class ProxySettings():
|
||||
if proxyline[:len(proto)] == proto:
|
||||
proxyline = proxyline[len(proto):]
|
||||
proxAddr, proxPort = proxyline.split(":")
|
||||
proxPort = proxPort.rstrip("/")
|
||||
proxy = proto + proxAddr + proxPort
|
||||
proxPort = int(proxPort.rstrip("/"))
|
||||
proxy = (proxAddr, proxPort)
|
||||
break
|
||||
|
||||
return proxy
|
||||
Reference in New Issue
Block a user