comments on the code
This commit is contained in:
parent
7574ac43aa
commit
69d747baec
|
@ -51,7 +51,10 @@ class Multi(list):
|
|||
self.config = config
|
||||
self.opt = opt
|
||||
if self.opt.is_master(config):
|
||||
# we pass the list at the list type's init
|
||||
# because a normal init cannot return anything
|
||||
super(Multi, self).__init__(lst)
|
||||
# we add the slaves without modifying the master
|
||||
for l in lst:
|
||||
try:
|
||||
self.append(l, add_master=False)
|
||||
|
@ -66,7 +69,10 @@ class Multi(list):
|
|||
|
||||
def append(self, value, add_master=True):
|
||||
"""the list value can be updated (appened)
|
||||
only if the option is a master"""
|
||||
only if the option is a master
|
||||
:param add_master: adds slaves without modifiying the master option
|
||||
if True, adds slaves **and** the master option
|
||||
"""
|
||||
try:
|
||||
master = self.config._cfgimpl_descr.get_master_name()
|
||||
if master != self.opt._name:
|
||||
|
|
Loading…
Reference in New Issue