private method _get_multitype()
This commit is contained in:
parent
77633c84ce
commit
ea7d297c9b
2 changed files with 3 additions and 4 deletions
|
@ -30,7 +30,6 @@ from tiramisu.option import (OptionDescription, Option, SymLinkOption,
|
|||
from tiramisu.setting import groups, owners, Setting
|
||||
from tiramisu.value import Values
|
||||
|
||||
|
||||
# ____________________________________________________________
|
||||
class Config(object):
|
||||
"main configuration management entry"
|
||||
|
|
|
@ -38,7 +38,7 @@ class Values(object):
|
|||
self.slaves = {}
|
||||
self.context = context
|
||||
|
||||
def _get_multitype(self):
|
||||
def _get_multitype(self, opt):
|
||||
if opt in self.slaves:
|
||||
# slave
|
||||
multitype = multitypes.slave
|
||||
|
@ -54,7 +54,7 @@ class Values(object):
|
|||
"special case for the multis: they never return None"
|
||||
if opt not in self.values:
|
||||
if opt.is_multi():
|
||||
multitype = self._get_multitype()
|
||||
multitype = self._get_multitype(opt)
|
||||
return Multi(opt.getdefault(), self.context, opt, multitype)
|
||||
else:
|
||||
return opt.getdefault()
|
||||
|
@ -103,7 +103,7 @@ class Values(object):
|
|||
_result = [result]
|
||||
else:
|
||||
_result = result
|
||||
multitype = self._get_multitype()
|
||||
multitype = self._get_multitype(opt)
|
||||
return Multi(_result, self.context, opt, multitype)
|
||||
|
||||
def __getitem__(self, opt):
|
||||
|
|
Loading…
Reference in a new issue