mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-06-10 12:22:27 +03:00
EDSM: credentials() should just return None
if no apikey
This commit is contained in:
parent
7bae9afe02
commit
d5bb0cce5d
@ -333,12 +333,9 @@ def credentials(cmdr: str) -> Optional[Tuple[str, str]]:
|
|||||||
and (edsm_apikeys := config.get_list('edsm_apikeys'))):
|
and (edsm_apikeys := config.get_list('edsm_apikeys'))):
|
||||||
idx = cmdrs.index(cmdr)
|
idx = cmdrs.index(cmdr)
|
||||||
# The EDSM cmdr and apikey might not exist yet!
|
# The EDSM cmdr and apikey might not exist yet!
|
||||||
if idx >= len(edsm_usernames):
|
if idx >= len(edsm_usernames) or idx >= len(edsm_apikeys):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
if idx >= len(edsm_apikeys):
|
|
||||||
edsm_apikeys[idx] = None
|
|
||||||
|
|
||||||
return (edsm_usernames[idx], edsm_apikeys[idx])
|
return (edsm_usernames[idx], edsm_apikeys[idx])
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user