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:
parent
84500b775a
commit
3283439485
@ -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:
|
||||
|
@ -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')
|
||||
|
2
plug.py
2
plug.py
@ -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
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user