summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2022-06-12 02:02:39 +0300
committerEvgeny Zinoviev <me@ch1p.io>2022-06-12 02:02:39 +0300
commit03b2d0a2ae7c529c29e8f4b81ed8705dc82e0452 (patch)
tree839f130b7eca82fe142c44ad1b7bf343b5ad10b8
parent0dc38ac37f9f2974bbf87824ae55283fa7308adb (diff)
ipcam_server: update
-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,