explorationtools.py: fixed finding cmdr with hidden activity time

This commit is contained in:
alterNERDtive 2020-09-29 11:09:13 +02:00
parent ebfa86e163
commit bf592168c1
2 changed files with 6 additions and 3 deletions

View file

@ -32,8 +32,11 @@ def getCommanderProfileUrl(name, apikey):
def getCommanderSystem(name, apikey):
cmdr = Commander(name, apikey)
return "{} (last seen {})".format(cmdr.currentSystem,
when(cmdr.lastActivity))
if cmdr.lastActivity is None:
return "{}".format(cmdr.currentSystem)
else:
return "{} (last seen {})".format(cmdr.currentSystem,
when(cmdr.lastActivity))
def when(date):
diff = datetime.now() - date
ret = ""

2
pyEDSM

@ -1 +1 @@
Subproject commit 36a660f240c7e57cf524fe9640d13e56c7e42e79
Subproject commit be921a4f83a6b36155bca9814d9647ecae341f1d