From 65e3e67a83cd0f7422d40480696adcb68dd0d5db Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Sat, 4 Nov 2023 12:56:35 +0000 Subject: [PATCH] avoid import error for non-rk builds (#8454) * avoid import error for non-rk builds * linter --- frigate/detectors/plugins/rknn.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/frigate/detectors/plugins/rknn.py b/frigate/detectors/plugins/rknn.py index dcbd0cd3b..e40c1d4bb 100644 --- a/frigate/detectors/plugins/rknn.py +++ b/frigate/detectors/plugins/rknn.py @@ -4,7 +4,15 @@ from typing import Literal import cv2 import cv2.dnn import numpy as np -from hide_warnings import hide_warnings + +try: + from hide_warnings import hide_warnings +except: # noqa: E722 + + def hide_warnings(func): + pass + + from pydantic import Field from frigate.detectors.detection_api import DetectionApi