Changes the way that command sets are duplicated in a merge to be sure class

attributes are propagated.
This commit is contained in:
lagos 2012-10-26 20:24:21 -07:00
parent ec46465656
commit 024aff8563

View file

@ -202,7 +202,7 @@ class CmdSet(object):
Returns a new cmdset with the same settings as this one
(no actual commands are copied over)
"""
cmdset = CmdSet()
cmdset = self.__class__()
cmdset.__dict__.update(dict((key, val) for key, val in self.__dict__.items() if key in self.to_duplicate))
cmdset.key_mergetypes = self.key_mergetypes.copy() #copy.deepcopy(self.key_mergetypes)
return cmdset