Merge "Sync with latest version of openstack.common.cfg"
This commit is contained in:
commit
7aa0fa014e
@ -464,7 +464,7 @@ def _is_opt_registered(opts, opt):
|
||||
:raises: DuplicateOptError if a naming conflict is detected
|
||||
"""
|
||||
if opt.dest in opts:
|
||||
if opts[opt.dest]['opt'] is not opt:
|
||||
if opts[opt.dest]['opt'] != opt:
|
||||
raise DuplicateOptError(opt.name)
|
||||
return True
|
||||
else:
|
||||
@ -527,6 +527,9 @@ class Opt(object):
|
||||
else:
|
||||
self.deprecated_name = None
|
||||
|
||||
def __ne__(self, another):
|
||||
return vars(self) != vars(another)
|
||||
|
||||
def _get_from_config_parser(self, cparser, section):
|
||||
"""Retrieves the option value from a MultiConfigParser object.
|
||||
|
||||
|
@ -53,7 +53,8 @@ class BaseParser(object):
|
||||
key, value = line[:colon], line[colon + 1:]
|
||||
|
||||
value = value.strip()
|
||||
if value[0] == value[-1] and value[0] == "\"" or value[0] == "'":
|
||||
if ((value and value[0] == value[-1]) and
|
||||
(value[0] == "\"" or value[0] == "'")):
|
||||
value = value[1:-1]
|
||||
return key.strip(), [value]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user