From 7de0dabb54c4eed29ab150e78d55b33797e96cc2 Mon Sep 17 00:00:00 2001 From: magmaus3 Date: Fri, 9 Jun 2023 14:46:23 +0200 Subject: [PATCH] fixes --- iwm_browser/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iwm_browser/utils.py b/iwm_browser/utils.py index 4528fc6..4cd6e1e 100644 --- a/iwm_browser/utils.py +++ b/iwm_browser/utils.py @@ -23,7 +23,10 @@ def config_value(key: str, default_value=""): The value must be in json format!""" if key in os.environ: - return json.loads(os.environ[key]) + try: + return json.loads(os.environ[key]) + except json.JSONDecodeError: + return os.environ[key] else: return default_value