From 0baf51ebdee01ba76b9eca338ddb1e82b83e3b37 Mon Sep 17 00:00:00 2001 From: BhasherBEL Date: Mon, 19 Feb 2024 18:53:23 +0100 Subject: [PATCH] Fix content parsing --- main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 684c81c..66d6c66 100644 --- a/main.py +++ b/main.py @@ -21,8 +21,10 @@ def get_env(name, default=None, mandatory=False): if mandatory and content is None: raise ValueError(f'Missing environment variable {name}') - if type(default) == bool: + if type(default) == str: return content.lower() in ('true', '1') + if type(default) == bool: + return content if type(default) == int: return int(content) if type(default) == float: