Skip to content

Commit

Permalink
get_all_feeds returns set
Browse files Browse the repository at this point in the history
  • Loading branch information
tribela committed Oct 6, 2013
1 parent 7f941d2 commit 040d013
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libearth/feedlist.py
Expand Up @@ -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):
Expand Down

0 comments on commit 040d013

Please sign in to comment.