Fix content parsing
Build and publish / docker (push) Successful in 2m15s
Details
Build and publish / docker (push) Successful in 2m15s
Details
This commit is contained in:
parent
aa6b374075
commit
0baf51ebde
4
main.py
4
main.py
|
@ -21,8 +21,10 @@ def get_env(name, default=None, mandatory=False):
|
||||||
if mandatory and content is None:
|
if mandatory and content is None:
|
||||||
raise ValueError(f'Missing environment variable {name}')
|
raise ValueError(f'Missing environment variable {name}')
|
||||||
|
|
||||||
if type(default) == bool:
|
if type(default) == str:
|
||||||
return content.lower() in ('true', '1')
|
return content.lower() in ('true', '1')
|
||||||
|
if type(default) == bool:
|
||||||
|
return content
|
||||||
if type(default) == int:
|
if type(default) == int:
|
||||||
return int(content)
|
return int(content)
|
||||||
if type(default) == float:
|
if type(default) == float:
|
||||||
|
|
Loading…
Reference in New Issue