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

Remove unused method argument

parent da7ecae2
Loading
Loading
Loading
Loading
+7 −22
Original line number Diff line number Diff line
@@ -315,7 +315,7 @@ class TagDB(object):
            for tag in tags:
                self.add_sub_tag(sub_id, tag)

    def set_parent(self, parent, ignore_errors=False):
    def set_parent(self, parent):
        """Set parent tag database."""
        # check if previous parent
        if self._parent is not None:
@@ -329,8 +329,7 @@ class TagDB(object):
        self._parent = parent
        if self._parent is not None:
            # add tags in new parent
            self._parent.add_tags(self.db['__main__'].itervalues(),
                                  ignore_errors)
            self._parent.add_tags(self.db['__main__'].itervalues())

            for sub_id, db in self.db.iteritems():
                if sub_id == '__main__':
@@ -359,30 +358,16 @@ class TagDB(object):
        return conflicts

    # tag handling part, used by plugins
    def add_tags(self, tags, ignore_errors=False):
    def add_tags(self, tags):
        """
        :param iterable tags: list of tags to add
        """
        for tag in tags:
            try:
            self.add_tag(tag)
            except TagConflict as exc:
                if not ignore_errors:
                    raise
                # else
                logger.warning('Ignoring error %s while adding tag %s',
                               exc, tag.name)

    def add_sub_tags(self, sub_id, tags, ignore_errors=False):
    def add_sub_tags(self, sub_id, tags):
        for tag in tags:
            try:
            self.add_sub_tag(sub_id, tag)
            except TagConflict as exc:
                if not ignore_errors:
                    raise
                # else
                logger.warning('Ignoring error %s while adding tag %s (%s)',
                               exc, tag.name, sub_id)

    def remove_tags(self, tag_names):
        """