fixed exception handling for commander stuff

This commit is contained in:
alterNERDtive 2019-09-18 13:40:35 +02:00
parent d5ccf71303
commit 5bc4c32869
2 changed files with 7 additions and 1 deletions

View file

@ -61,6 +61,9 @@ def outputGui():
except (ServerError, NotFoundError) as e:
lbl = tk.Label(frame, text=e)
lbl.grid(row=0, columnspan=2)
except EdsmApiException as e:
lbl = tk.Label(frame, text=e)
lbl.grid(row=0, columnspan=2)
window = tk.Tk()
window.title('EDSM nearest CMDR')
lbl = tk.Label(window, text='system:')
@ -86,6 +89,9 @@ def outputText():
except (ServerError, NotFoundError) as e:
print(e)
exit(1)
except EdsmApiException as e:
print(e)
exit(1)
nearestCmdr = min(distances,key=distances.get)
if shortOutput:
print('nearest commander: {} ({} ly).'.format(nearestCmdr,

2
pyEDSM

@ -1 +1 @@
Subproject commit 13d766a2b9305c009b985be6d79fac7fdb1bf960
Subproject commit 573c6c322ff27e304fc2dd803f362156f8d45dbb