Commit caf35e8d authored by Anaël Beutot's avatar Anaël Beutot
Browse files

Fix parent argument

parent 4afc8461
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -292,7 +292,7 @@ class TagDB(object):
        :param TagDB parent_db: TagDB parent object
        :param iterable tags: initial tags
        """
        self._parent = parent_db
        self._parent = None

        if tags is None:
            tags = tuple()
@@ -308,6 +308,8 @@ class TagDB(object):
        for tag in tags:
            self.add_tag(tag)

        self.set_parent(parent_db)

    def set_parent(self, parent):
        """Set parent tag database."""
        # check if previous parent
@@ -463,7 +465,8 @@ class RootTagDB(TagDB):
        TagDB.__init__(self, tags=tags)

    def set_parent(self, parent):
        raise NotImplementedError('Cannot set parent on RootTagDB')
        if parent is not None:
            raise TypeError('Cannot set parent on RootTagDB')

    # RPC part
    def rpc_call(self, opaque, callback, remote_name, *args, **kwargs):