From 4256d6461d6c794b67a7afca91798c69c4fb0ab2 Mon Sep 17 00:00:00 2001 From: Ihor Panasiuk Date: Tue, 24 Dec 2024 17:36:57 +0200 Subject: [PATCH] fix: Add check for None in providers provisioning form env var (#2896) --- keep/parser/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keep/parser/parser.py b/keep/parser/parser.py index 3d5921a98..72c30c7ad 100644 --- a/keep/parser/parser.py +++ b/keep/parser/parser.py @@ -255,7 +255,7 @@ def _parse_providers_from_env(self, context_manager: ContextManager): providers_json = os.environ.get("KEEP_PROVIDERS") # check if env var is absolute or relative path to a providers json file - if re.compile(r"^(\/|\.\/|\.\.\/).*\.json$").match( + if providers_json and re.compile(r"^(\/|\.\/|\.\.\/).*\.json$").match( providers_json ): with open(