1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-14 08:17:13 +03:00

Code style fixes

This commit is contained in:
norohind 2021-08-10 03:00:36 +03:00
parent 84500b775a
commit 3283439485
Signed by: norohind
GPG Key ID: 01C3BECC26FB59E1
3 changed files with 7 additions and 2 deletions

View File

@ -872,8 +872,10 @@ class AppWindow(object):
play_bad = False
err: Optional[str] = None
if not monitor.cmdr or not monitor.mode or monitor.state['Captain'] or not monitor.system or \
monitor.mode == 'CQC':
if (
not monitor.cmdr or not monitor.mode or monitor.state['Captain']
or not monitor.system or monitor.mode == 'CQC'
):
return # In CQC or on crew - do nothing
if companion.session.state == companion.Session.STATE_AUTH:

View File

@ -533,6 +533,7 @@ class EDLogs(FileSystemEventHandler): # type: ignore # See below
if not entry.get('Ship') and not entry.get('GameMode') or entry.get('GameMode').lower() == 'CQC':
logger.trace(f'loadgame to cqc: {entry}')
self.mode = 'CQC'
else:
self.mode = entry.get('GameMode')
self.group = entry.get('Group')

View File

@ -330,8 +330,10 @@ def notify_journal_entry_cqc(cmdr, is_beta, entry, state):
# Pass a copy of the journal entry in case the callee modifies it
newerror = journal_entry(cmdr, is_beta, dict(entry), dict(state))
error = error or newerror
except Exception as e:
logger.exception(f'Plugin "{plugin.name}" failed')
return error