summaryrefslogtreecommitdiff
path: root/src/ipcam_server.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipcam_server.py')
-rwxr-xr-xsrc/ipcam_server.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/ipcam_server.py b/src/ipcam_server.py
index 6856621..a9218c6 100755
--- a/src/ipcam_server.py
+++ b/src/ipcam_server.py
@@ -330,11 +330,8 @@ async def process_fragments(camera: int,
start_pos=start,
duration=duration)
- try:
- if fragments and config['motion']['telegram']:
- asyncio.ensure_future(motion_notify_tg(camera, filename, fragments))
- except KeyError:
- pass
+ if fragments and 'telegram' in config['motion'] and config['motion']['telegram']:
+ asyncio.ensure_future(motion_notify_tg(camera, filename, fragments))
async def motion_notify_tg(camera: int,