cfg: Don't fallback to develop config if main is not found

This was needed when our behavior for reading production vs. development
configuration depended on the presence of configuration files in expected
locations. The current behavior is based on whether --develop option is given or
not. This behavior is safer and more predictable.

So, remove the option to fallback to develop configuration if the production
configuration is not found.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2020-06-23 17:33:14 -07:00 committed by James Valleroy
parent 6230f8e6ce
commit 64b1c21fe0
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -39,13 +39,8 @@ def get_fallback_config_paths():
def get_config_paths():
"""Get config paths.
Return the fallback plinth config if the default one does not exist"""
root_directory = DEFAULT_ROOT
config_path = DEFAULT_CONFIG_FILE
if not os.path.isfile(config_path):
config_path, root_directory = get_fallback_config_paths()
return config_path, root_directory
"""Get default config paths."""
return '/etc/plinth/plinth.config', '/'
def read(config_path=None, root_directory=None):