From 4dcde5f80e1db4004755a2b9f57acb14301d754a Mon Sep 17 00:00:00 2001 From: Artom Lifshitz Date: Mon, 17 Feb 2014 14:16:05 -0500 Subject: [PATCH] Stop abusing state_path in find_config It makes no sense to look for configuration in the same location where state is stored. Replacing state_path by pybasedir keeps current behaviour while allowing us to change the default state_path from Designate's install location to /var/lib/designate in a subsequent patchset. Change-Id: I82fed1ddde0dbc7340a6ad5dcb80dbcba72b8358 --- designate/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/designate/utils.py b/designate/utils.py index f3e280a6b..247c4f517 100644 --- a/designate/utils.py +++ b/designate/utils.py @@ -44,9 +44,9 @@ def find_config(config_path): """ possible_locations = [ config_path, - os.path.join(cfg.CONF.state_path, "etc", "designate", config_path), - os.path.join(cfg.CONF.state_path, "etc", config_path), - os.path.join(cfg.CONF.state_path, config_path), + os.path.join(cfg.CONF.pybasedir, "etc", "designate", config_path), + os.path.join(cfg.CONF.pybasedir, "etc", config_path), + os.path.join(cfg.CONF.pybasedir, config_path), "/etc/designate/%s" % config_path, ]