catch error when there are no results

This commit is contained in:
Tobin
2015-03-31 10:49:56 -05:00
parent 26aab7a2cd
commit f9265fd33b

View File

@@ -64,8 +64,11 @@ class SubredditPage(BasePage):
search = text_input(window)
if search is not None:
self.content = SubredditContent.from_name(self.reddit, name,
try:
self.content = SubredditContent.from_name(self.reddit, name,
self.loader, search=search)
except:
show_notification(self.stdscr, ['No results found'])
@SubredditController.register('/')
def prompt_subreddit(self):