mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2026-11-26 03:26:57 +03:00
Code style fixes
This commit is contained in:
3 files changed
+7
-2
No files matched your search
@@ -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')
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user