Remove / disable debugging prints

This commit is contained in:
blitzmann
2014-08-17 23:40:22 -04:00
parent 8928d394c0
commit e8041470c8
4 changed files with 8 additions and 14 deletions

View File

@@ -35,5 +35,4 @@ class Price(object):
@property
def isValid(self):
print self.time, time.time(), self.time >= time.time()
return self.time >= time.time()

View File

@@ -35,9 +35,9 @@ class exportHtmlThread(threading.Thread):
def run(self):
# wait 1 second just in case a lot of modifications get made
time.sleep(1);
time.sleep(1)
if self.stopRunning:
return;
return
sMkt = service.Market.getInstance()
sFit = service.Fit.getInstance()
@@ -190,8 +190,8 @@ class exportHtmlThread(threading.Thread):
try:
FILE = open(settings.getPath(), "w")
FILE.write(HTML.encode('utf-8'));
FILE.close();
FILE.write(HTML.encode('utf-8'))
FILE.close()
except IOError:
print "Failed to write to " + settings.getPath()
pass

View File

@@ -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()

View File

@@ -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()