diff --git a/dashboard.py b/dashboard.py index 4e7f9ce6..68e828e5 100644 --- a/dashboard.py +++ b/dashboard.py @@ -115,6 +115,9 @@ class Dashboard(FileSystemEventHandler): # Can be called either in watchdog thread or, if polling, in main thread. def process(self, logfile=None): + if config.shutting_down(): + return + try: with open(join(self.currentdir, 'Status.json'), 'rb') as h: data = h.read().strip() @@ -126,6 +129,7 @@ class Dashboard(FileSystemEventHandler): self.status != entry): self.status = entry self.root.event_generate('<>', when="tail") + except Exception: logger.exception('Reading Status.json')