correction in fullpath option
This commit is contained in:
parent
66f24bd1c0
commit
7fe47396ee
|
@ -1,3 +1,6 @@
|
|||
Mon Jan 9 20:12:02 2017 +0200 Emmanuel Garette <egarette@cadoles.com>
|
||||
* make_dict has new fullpath option
|
||||
|
||||
Wed Nov 16 22:30:12 2016 +0200 Emmanuel Garette <egarette@cadoles.com>
|
||||
* consistency "not_equal" works now with multi and submulti
|
||||
* a multi or submulti could be "unique" (same value one time)
|
||||
|
|
|
@ -149,6 +149,7 @@ def test_make_dict_fullpath():
|
|||
config.read_only()
|
||||
assert config.make_dict() == {"opt.s1.a": False, "opt.int": 42, "introot": 42}
|
||||
assert config.opt.make_dict() == {"s1.a": False, "int": 42}
|
||||
assert config.make_dict(fullpath=True) == {"opt.s1.a": False, "opt.int": 42, "introot": 42}
|
||||
assert config.opt.make_dict(fullpath=True) == {"opt.s1.a": False, "opt.int": 42}
|
||||
|
||||
|
||||
|
|
|
@ -545,7 +545,11 @@ class SubConfig(object):
|
|||
name = opt.impl_getname()
|
||||
else:
|
||||
if fullpath:
|
||||
name = '.'.join([self._impl_path, opt.impl_getname()])
|
||||
root_path = self.cfgimpl_get_path()
|
||||
if root_path is None:
|
||||
name = opt.impl_getname()
|
||||
else:
|
||||
name = '.'.join([root_path, opt.impl_getname()])
|
||||
else:
|
||||
name = '.'.join(_currpath + [opt.impl_getname()])
|
||||
pathsvalues.append((name, value))
|
||||
|
|
Loading…
Reference in New Issue