Skip to content

Instantly share code, notes, and snippets.

@tischler
Created March 11, 2010 05:56
Show Gist options
  • Save tischler/328886 to your computer and use it in GitHub Desktop.
Save tischler/328886 to your computer and use it in GitHub Desktop.
@@ -246,11 +246,14 @@ def set_subreddit():
if '+' in sr_name:
srs = set()
sr_names = sr_name.split('+')
- real_path = sr_name
- for sr_name in sr_names:
- srs.add(Subreddit._by_name(sr_name))
- sr_ids = [sr._id for sr in srs]
- c.site = MultiReddit(sr_ids, real_path)
+ if 'all' in sr_names:
+ c.site = Subreddit._by_name('all')
+ else:
+ real_path = sr_name
+ for sr_name in sr_names:
+ srs.add(Subreddit._by_name(sr_name))
+ sr_ids = [sr._id for sr in srs]
+ c.site = MultiReddit(sr_ids, real_path)
else:
c.site = Subreddit._by_name(sr_name)
except NotFound:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment