summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien Danjou <julien@danjou.info>2013-06-07 17:23:38 +0200
committerJulien Danjou <julien@danjou.info>2013-06-07 17:23:38 +0200
commitadff2ccbf346645e8105c82ac39410459f2ac303 (patch)
treedc0901e7784d93e693d340dd41634e5dbb465334
parent5ce33b2adcf2477fe1192d7061cf49a8ab1a44a2 (diff)
downloadoslo-adff2ccbf346645e8105c82ac39410459f2ac303.tar.gz
oslo-adff2ccbf346645e8105c82ac39410459f2ac303.tar.xz
oslo-adff2ccbf346645e8105c82ac39410459f2ac303.zip
Fix workarounds for some values
This fixes the default values for hostnames and paths. Change-Id: I434a4f0269e2d0a3a667056233078ff01d0cdb72 Signed-off-by: Julien Danjou <julien@danjou.info>
-rwxr-xr-xopenstack/common/config/generator.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/openstack/common/config/generator.py b/openstack/common/config/generator.py
index 4251c87..5d4e005 100755
--- a/openstack/common/config/generator.py
+++ b/openstack/common/config/generator.py
@@ -56,7 +56,8 @@ OPTION_REGEX = re.compile(r"(%s)" % "|".join([STROPT, BOOLOPT, INTOPT,
MULTISTROPT]))
PY_EXT = ".py"
-BASEDIR = os.path.abspath(os.path.join(os.path.dirname(__file__), "../../"))
+BASEDIR = os.path.abspath(os.path.join(os.path.dirname(__file__),
+ "../../../../"))
WORDWRAP_WIDTH = 60
@@ -193,7 +194,7 @@ def _sanitize_default(s):
return s.replace(BASEDIR, '')
elif s == _get_my_ip():
return '10.0.0.1'
- elif s == socket.getfqdn():
+ elif s == socket.gethostname():
return 'oslo'
elif s.strip() != s:
return '"%s"' % s