From ae9133b17524b7c514b1533b86ebacf6074042f4 Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Mon, 2 Jan 2023 16:18:48 -0700 Subject: [PATCH] only return stderr if return code is not 0 --- frigate/http.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frigate/http.py b/frigate/http.py index a469709b8..0b4f048cf 100644 --- a/frigate/http.py +++ b/frigate/http.py @@ -1222,10 +1222,10 @@ def vainfo(): { "return_code": vainfo.returncode, "stderr": vainfo.stderr.decode("unicode_escape").strip() - if vainfo.stderr.decode() + if vainfo.returncode != 0 else "", "stdout": vainfo.stdout.decode("unicode_escape").strip() - if vainfo.stdout.decode() + if vainfo.returncode == 0 else "", } )