diff --git a/devstack/env.py b/devstack/env.py index 29d7eed1..7c5c2c2d 100644 --- a/devstack/env.py +++ b/devstack/env.py @@ -30,18 +30,19 @@ def set(key, value): # See: from http://docs.python.org/library/os.html # Calling putenv() directly does not change os.environ, so it's better to modify os.environ. if key is not None: - LOG.audit("Setting environment key [%s] to value [%s]" % (key, value)) + LOG.audit("Setting environment key %r to value %r" % (str(key), str(value))) os.environ[str(key)] = str(value) def get_key(key, default_value=None): if not key: return default_value - LOG.debug("Looking up environment variable [%s]" % (key)) + key = str(key) + LOG.debug("Looking up environment variable %r" % (key)) value = get().get(key) if value is None: - LOG.debug("Could not find anything in environment variable [%s]" % (key)) + LOG.debug("Could not find anything in environment variable %r" % (key)) value = default_value else: - LOG.audit("Found [%s] in environment variable [%s]" % (value, key)) + LOG.audit("Found %r in environment variable %r" % (value, key)) return value diff --git a/devstack/env_rc.py b/devstack/env_rc.py index e9c0755d..97a90ea9 100644 --- a/devstack/env_rc.py +++ b/devstack/env_rc.py @@ -272,12 +272,12 @@ class RcReader(object): def extract(self, fn): extracted_vars = dict() contents = '' - LOG.audit("Loading rc file [%s]" % (fn)) + LOG.audit("Loading rc file %r" % (fn)) try: with open(fn, 'r') as fh: contents = fh.read() except IOError as e: - LOG.warn("Failed extracting rc file [%s] due to [%s]" % (fn, e)) + LOG.warn("Failed extracting rc file %r due to %s" % (fn, e)) return extracted_vars for line in contents.splitlines(): if self._is_comment(line):