mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-22 20:00:29 +03:00
dashboard: Bail early from process() if in shutdown
This commit is contained in:
parent
50f520ab66
commit
cb9bd30a05
@ -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('<<DashboardEvent>>', when="tail")
|
||||
|
||||
except Exception:
|
||||
logger.exception('Reading Status.json')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user