diff --git a/libearth/feedlist.py b/libearth/feedlist.py index 0be5247..0fb6d8c 100644 --- a/libearth/feedlist.py +++ b/libearth/feedlist.py @@ -175,14 +175,14 @@ def __init__(self, title, type=None, text=None, category=None, self.urls = [] # to avoid duplication of feeds for the same category def get_all_feeds(self): - res = [] + res = set() for obj in self.children: if isinstance(obj, FeedCategory): - res += obj.get_all_feeds() + res = res.union(obj.get_all_feeds()) else: - res.append(obj) + res.add(obj) - return list(set(res)) + return res def insert(self, index, value): if not isinstance(value, FeedTree):