catch IndexError when the search returns no results

This commit is contained in:
Tobin
2015-03-31 13:52:09 -05:00
parent 2a7525debd
commit 31526483fd

View File

@@ -61,7 +61,7 @@ class SubredditPage(BasePage):
self.nav.cursor_index = 0 self.nav.cursor_index = 0
self.content = SubredditContent.from_name(self.reddit, name, self.content = SubredditContent.from_name(self.reddit, name,
self.loader, search=search) self.loader, search=search)
except: except IndexError: # if there are no submissions
show_notification(self.stdscr, ['No results found']) show_notification(self.stdscr, ['No results found'])
@SubredditController.register('/') @SubredditController.register('/')