mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-20 05:13:21 -07:00
Add log message when environment variable not saved to config
This commit is contained in:
parent
0f749035a1
commit
136ef21a86
1 changed files with 7 additions and 4 deletions
|
@ -502,7 +502,10 @@ class Config(object):
|
||||||
key, definition_type, section, ini_key, default = self._define(name)
|
key, definition_type, section, ini_key, default = self._define(name)
|
||||||
# Check if the key is in the environment variables
|
# Check if the key is in the environment variables
|
||||||
env_value = self._from_env(key)
|
env_value = self._from_env(key)
|
||||||
if not env_value:
|
if env_value:
|
||||||
|
logger.warn("Tautulli Config :: '%s' set by environment variable. Setting not saved to config.", key)
|
||||||
|
return
|
||||||
|
|
||||||
# If not, set the value in the config file
|
# If not, set the value in the config file
|
||||||
self._config[section][ini_key] = self._cast_setting(definition_type, value, default)
|
self._config[section][ini_key] = self._cast_setting(definition_type, value, default)
|
||||||
return self._config[section][ini_key]
|
return self._config[section][ini_key]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue