From 3283439485a24415f2a3d387e29df7cdd3aed89a Mon Sep 17 00:00:00 2001
From: norohind <60548839+norohind@users.noreply.github.com>
Date: Tue, 10 Aug 2021 03:00:36 +0300
Subject: [PATCH] Code style fixes

---
 EDMarketConnector.py | 6 ++++--
 monitor.py           | 1 +
 plug.py              | 2 ++
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/EDMarketConnector.py b/EDMarketConnector.py
index e8c567da..da75dd8b 100755
--- a/EDMarketConnector.py
+++ b/EDMarketConnector.py
@@ -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:
diff --git a/monitor.py b/monitor.py
index f5fb2dfd..302d0931 100644
--- a/monitor.py
+++ b/monitor.py
@@ -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')
diff --git a/plug.py b/plug.py
index f2a9b861..1287181d 100644
--- a/plug.py
+++ b/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