From 03b2d0a2ae7c529c29e8f4b81ed8705dc82e0452 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Sun, 12 Jun 2022 02:02:39 +0300 Subject: ipcam_server: update --- src/ipcam_server.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/ipcam_server.py') 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, -- cgit v1.2.3