mirror of
https://github.com/sartography/spiff-arena.git
synced 2025-01-27 01:40:48 +00:00
fix(): AttributeError: 'NoneType' object has no attribute 'startswith'
This commit is contained in:
parent
998e08ee6e
commit
84a47e0efd
@ -18,7 +18,7 @@ def config_from_env(variable_name: str, *, default: str | bool | int | None = No
|
|||||||
# using docker secrets - put file contents to env value
|
# using docker secrets - put file contents to env value
|
||||||
if variable_name.endswith("_FILE"):
|
if variable_name.endswith("_FILE"):
|
||||||
value_from_file = default if value_from_env is None else value_from_env
|
value_from_file = default if value_from_env is None else value_from_env
|
||||||
if value_from_file.startswith("/run/secrets"):
|
if value_from_file and value_from_file.startswith("/run/secrets"):
|
||||||
# rewrite variable name: remove _FILE
|
# rewrite variable name: remove _FILE
|
||||||
variable_name = variable_name.removesuffix("_FILE")
|
variable_name = variable_name.removesuffix("_FILE")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user