From 64b1c21fe0ecf39df6c0185e056206cb062f3496 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Tue, 23 Jun 2020 17:33:14 -0700 Subject: [PATCH] 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 Reviewed-by: James Valleroy --- plinth/cfg.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/plinth/cfg.py b/plinth/cfg.py index f3ebd3576..c270d2b1b 100644 --- a/plinth/cfg.py +++ b/plinth/cfg.py @@ -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):