Skip to content

Commit

Permalink
fix: Add check for None in providers provisioning form env var (#2896)
Browse files Browse the repository at this point in the history
  • Loading branch information
skynetigor authored Dec 24, 2024
1 parent e268e33 commit 4256d64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion keep/parser/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 4256d64

Please sign in to comment.