diff --git a/EDMarketConnector.py b/EDMarketConnector.py index bc1c6730..c711f398 100755 --- a/EDMarketConnector.py +++ b/EDMarketConnector.py @@ -285,10 +285,10 @@ class AppWindow: else: self.edsm.start_lookup(self.system['text'], EDDB.system(self.system['text'])) self.status['text'] = '' - self.edsmpoll() except Exception as e: if __debug__: print_exc() self.status['text'] = unicode(e) + self.edsmpoll() if not (config.getint('output') & (config.OUT_CSV|config.OUT_TD|config.OUT_BPC|config.OUT_EDDN)): # no station data requested - we're done @@ -415,13 +415,13 @@ class AppWindow: edsm.writelog(timestamp, system, lambda:self.edsm.lookup(system, EDDB.system(system))) # Do EDSM lookup during EDSM export else: self.edsm.start_lookup(system, EDDB.system(system)) - self.edsmpoll() self.status['text'] = strftime(_('Last updated at {HH}:{MM}:{SS}').format(HH='%H', MM='%M', SS='%S').encode('utf-8'), localtime(timestamp)).decode('utf-8') except Exception as e: if __debug__: print_exc() self.status['text'] = unicode(e) if not config.getint('hotkey_mute'): hotkeymgr.play_bad() + self.edsmpoll() def edsmpoll(self): diff --git a/edsm.py b/edsm.py index 5229e53f..060f15e1 100644 --- a/edsm.py +++ b/edsm.py @@ -36,7 +36,7 @@ class EDSM: self.thread.daemon = True self.thread.start() else: - self.result = { 'img': '', 'url': 'http://www.edsm.net/needed-distances?systemName=%s' % urllib.quote(system_name), 'done': True } # default URL + self.result = { 'img': EDSM._IMG_ERROR, 'url': 'http://www.edsm.net/needed-distances?systemName=%s' % urllib.quote(system_name), 'done': True } # default URL r = requests.get('http://www.edsm.net/api-v1/system?sysname=%s&coords=1' % urllib.quote(system_name), timeout=EDSM._TIMEOUT) r.raise_for_status() data = r.json()