From adff2ccbf346645e8105c82ac39410459f2ac303 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Fri, 7 Jun 2013 17:23:38 +0200 Subject: Fix workarounds for some values This fixes the default values for hostnames and paths. Change-Id: I434a4f0269e2d0a3a667056233078ff01d0cdb72 Signed-off-by: Julien Danjou --- openstack/common/config/generator.py | 5 +++-- 1 file 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 -- cgit