mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-05-30 15:19:40 +03:00
Show system co-ordinates indication despite not being able to connect to EDSM for logging.
This commit is contained in:
parent
64cbffad1e
commit
1868caab99
@ -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):
|
||||
|
2
edsm.py
2
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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user