Remove / disable debugging prints
This commit is contained in:
@@ -60,15 +60,13 @@ class Network():
|
||||
return cls._instance
|
||||
|
||||
def request(self, url, type, data=None):
|
||||
|
||||
# URL is required to be https as of right now
|
||||
print "Starting request: %s\n\tType: %s\n\tPost Data: %s"%(url,type,data)
|
||||
#print "Starting request: %s\n\tType: %s\n\tPost Data: %s"%(url,type,data)
|
||||
|
||||
# Make sure request is enabled
|
||||
access = NetworkSettings.getInstance().getAccess()
|
||||
|
||||
if not self.ENABLED & access or not type & access:
|
||||
print "\tType not enabled"
|
||||
raise Error("Access not enabled - please enable in Preferences > Network")
|
||||
|
||||
# Set up some things for the request
|
||||
@@ -77,16 +75,13 @@ class Network():
|
||||
|
||||
proxy = NetworkSettings.getInstance().getProxySettings()
|
||||
if proxy is not None:
|
||||
print "\tUsing a proxy"
|
||||
proxy = urllib2.ProxyHandler({'https': "{0}:{1}".format(*proxy)})
|
||||
opener = urllib2.build_opener(proxy)
|
||||
urllib2.install_opener(opener)
|
||||
|
||||
request = urllib2.Request(url, headers=headers, data=urllib.urlencode(data) if data else None)
|
||||
try:
|
||||
data = urllib2.urlopen(request)
|
||||
print "\tReturning data"
|
||||
return data
|
||||
return urllib2.urlopen(request)
|
||||
except urllib2.HTTPError, error:
|
||||
if error.code == 404:
|
||||
raise RequestError()
|
||||
|
||||
@@ -32,7 +32,7 @@ class Price():
|
||||
@classmethod
|
||||
def fetchPrices(cls, prices):
|
||||
"""Fetch all prices passed to this method"""
|
||||
print "Fetch time: %s"%time.time()
|
||||
|
||||
# Dictionary for our price objects
|
||||
priceMap = {}
|
||||
# Check all provided price objects, and add invalid ones to dictionary
|
||||
@@ -41,8 +41,8 @@ class Price():
|
||||
priceMap[price.typeID] = price
|
||||
|
||||
if len(priceMap) == 0:
|
||||
print "No price updates"
|
||||
return
|
||||
|
||||
# Set of items which are still to be requested from this service
|
||||
toRequest = set()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user