From 84358adc4b575ed3a7dab5133ed5cbe28796d91f Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Wed, 21 Sep 2016 03:12:31 -0500 Subject: [PATCH] Prevent potential crash with delay settings If value is erased or missing, default to 0 --- service.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service.py b/service.py index efa06bdf..ac0b8f74 100644 --- a/service.py +++ b/service.py @@ -26,7 +26,7 @@ from utils import settings loghandler.config() log = logging.getLogger("EMBY.service") -DELAY = int(settings('startupDelay')) +DELAY = settings('startupDelay') or 0 ################################################################################################# @@ -35,7 +35,7 @@ if __name__ == "__main__": log.warn("Delaying emby startup by: %s sec...", DELAY) try: - if DELAY and xbmc.Monitor().waitForAbort(DELAY): + if DELAY and xbmc.Monitor().waitForAbort(int(DELAY)): raise RuntimeError("Abort event while waiting to start Emby for kodi") # Start the service Service().service_entry_point()