Loading cloudcontrol/common/client/tags.py +3 −11 Original line number Diff line number Diff line Loading @@ -287,18 +287,15 @@ class TagDB(object): registration on the cc-server. """ def __init__(self, parent_db=None, tags=None, sub_tags=None): def __init__(self, parent_db=None, tags=None): """ :param TagDB parent_db: TagDB parent object :param iterable tags: initial tags :param dict sub_tags: initial subtags """ self._parent = parent_db if tags is None: tags = tuple() if sub_tags is None: sub_tags = {} self.db = defaultdict( dict, Loading @@ -311,10 +308,6 @@ class TagDB(object): for tag in tags: self.add_tag(tag) for sub_id, tags in sub_tags.iteritems(): for tag in tags: self.add_sub_tag(sub_id, tag) def set_parent(self, parent): """Set parent tag database.""" # check if previous parent Loading Loading @@ -457,18 +450,17 @@ class RootTagDB(TagDB): It takes care of tag registration with cc-server. It has no parent. """ def __init__(self, main, tags=None, sub_tags=None): def __init__(self, main, tags=None): """ :param main: MainLoop instance :param tags: initial tags :param sub_tags: initial sub tags """ self.main = main #: dict for RPC async call storage, keep a part of log message self.async_calls = dict() TagDB.__init__(self, tags=tags, sub_tags=sub_tags) TagDB.__init__(self, tags=tags) def set_parent(self, parent): raise NotImplementedError('Cannot set parent on RootTagDB') Loading Loading
cloudcontrol/common/client/tags.py +3 −11 Original line number Diff line number Diff line Loading @@ -287,18 +287,15 @@ class TagDB(object): registration on the cc-server. """ def __init__(self, parent_db=None, tags=None, sub_tags=None): def __init__(self, parent_db=None, tags=None): """ :param TagDB parent_db: TagDB parent object :param iterable tags: initial tags :param dict sub_tags: initial subtags """ self._parent = parent_db if tags is None: tags = tuple() if sub_tags is None: sub_tags = {} self.db = defaultdict( dict, Loading @@ -311,10 +308,6 @@ class TagDB(object): for tag in tags: self.add_tag(tag) for sub_id, tags in sub_tags.iteritems(): for tag in tags: self.add_sub_tag(sub_id, tag) def set_parent(self, parent): """Set parent tag database.""" # check if previous parent Loading Loading @@ -457,18 +450,17 @@ class RootTagDB(TagDB): It takes care of tag registration with cc-server. It has no parent. """ def __init__(self, main, tags=None, sub_tags=None): def __init__(self, main, tags=None): """ :param main: MainLoop instance :param tags: initial tags :param sub_tags: initial sub tags """ self.main = main #: dict for RPC async call storage, keep a part of log message self.async_calls = dict() TagDB.__init__(self, tags=tags, sub_tags=sub_tags) TagDB.__init__(self, tags=tags) def set_parent(self, parent): raise NotImplementedError('Cannot set parent on RootTagDB') Loading