Prevent potential crash with delay settings

If value is erased or missing, default to 0
This commit is contained in:
angelblue05 2016-09-21 03:12:31 -05:00
parent a58503c264
commit 84358adc4b
1 changed files with 2 additions and 2 deletions

View File

@ -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()