summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/ipcam_server.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/ipcam_server.py b/src/ipcam_server.py
index d706651..56b6e18 100755
--- a/src/ipcam_server.py
+++ b/src/ipcam_server.py
@@ -372,9 +372,13 @@ if __name__ == '__main__':
loop = asyncio.get_event_loop()
- scheduler = AsyncIOScheduler(event_loop=loop)
- scheduler.add_job(fix_job, 'interval', seconds=config['fix_interval'])
- scheduler.start()
+ try:
+ if config['fix_enabled']:
+ scheduler = AsyncIOScheduler(event_loop=loop)
+ scheduler.add_job(fix_job, 'interval', seconds=config['fix_interval'])
+ scheduler.start()
+ except KeyError:
+ pass
server = IPCamWebServer(parse_addr(config['server']['listen']))
server.run()