From db5e8e14fef8b6afa8d6922602a9b336f66d639b Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Sun, 12 Jun 2022 14:45:11 +0300 Subject: ipcam_server: try to fix something.... --- src/home/http/http.py | 4 ++++ tools/ipcam_motion_worker.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/home/http/http.py b/src/home/http/http.py index acacb51..6ce16c4 100644 --- a/src/home/http/http.py +++ b/src/home/http/http.py @@ -7,6 +7,9 @@ from aiohttp.web_exceptions import HTTPNotFound from ..util import stringify, format_tb, Addr +_logger = logging.getLogger(__name__) + + @web.middleware async def errors_handler_middleware(request, handler): try: @@ -17,6 +20,7 @@ async def errors_handler_middleware(request, handler): return web.json_response({'error': 'not found'}, status=404) except Exception as exc: + _logger.exception(exc) data = { 'error': exc.__class__.__name__, 'message': exc.message if hasattr(exc, 'message') else str(exc) diff --git a/tools/ipcam_motion_worker.sh b/tools/ipcam_motion_worker.sh index 7b47cdc..8e5a993 100755 --- a/tools/ipcam_motion_worker.sh +++ b/tools/ipcam_motion_worker.sh @@ -168,7 +168,7 @@ do_motion() { fi timecodes="${timecodes[@]}" - timecodes=${timecodes// /,} + timecodes="${timecodes// /,}" echo "$timecodes" } -- cgit v1.2.3