From 77d69a723967d8f4a7e2f1bf6238f4be44a56bb4 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Tue, 22 Jan 2019 05:12:58 -0600 Subject: [PATCH] Fix object reload upon restart service --- service.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/service.py b/service.py index 7075b105..5844cb99 100644 --- a/service.py +++ b/service.py @@ -63,10 +63,13 @@ class ServiceManager(threading.Thread): service.service() except Exception as error: - if not 'ExitService' in error and service is not None: - service.shutdown() - elif 'RestartService' in error: - service.reload_objects() + if service is not None: + + if not 'ExitService' in error: + service.shutdown() + + if 'RestartService' in error: + service.reload_objects() self.exception = error