mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-15 00:30:33 +03:00
Fixed possible error if credentials is None
This commit is contained in:
parent
2c2ade05e0
commit
25adf29779
@ -491,7 +491,11 @@ def worker() -> None:
|
||||
if any([p for p in pending if p['event'] in ('CarrierJump', 'FSDJump', 'Location', 'Docked')]):
|
||||
logger.debug('CarrierJump (or FSDJump) in pending and it passed should_send()')
|
||||
|
||||
(username, apikey) = credentials(cmdr) # TODO: This raises if credentials returns None
|
||||
creds = credentials(cmdr) # TODO: possibly unbound
|
||||
if creds is None:
|
||||
raise ValueError("Unexpected lack of credentials")
|
||||
|
||||
(username, apikey) = creds
|
||||
data = {
|
||||
'commanderName': username.encode('utf-8'),
|
||||
'apiKey': apikey,
|
||||
|
Loading…
x
Reference in New Issue
Block a user