diff --git a/eos/saveddata/price.py b/eos/saveddata/price.py index b3c7d8151..4c7de879c 100644 --- a/eos/saveddata/price.py +++ b/eos/saveddata/price.py @@ -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() diff --git a/gui/utils/exportHtml.py b/gui/utils/exportHtml.py index 2dcc0be32..c61c2444a 100644 --- a/gui/utils/exportHtml.py +++ b/gui/utils/exportHtml.py @@ -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 diff --git a/service/network.py b/service/network.py index 8d8a62375..04ba49875 100644 --- a/service/network.py +++ b/service/network.py @@ -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() diff --git a/service/price.py b/service/price.py index eb1600c4b..fafdf3297 100644 --- a/service/price.py +++ b/service/price.py @@ -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()