catch error when there are no results
This commit is contained in:
@@ -64,8 +64,11 @@ class SubredditPage(BasePage):
|
|||||||
|
|
||||||
search = text_input(window)
|
search = text_input(window)
|
||||||
if search is not None:
|
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)
|
self.loader, search=search)
|
||||||
|
except:
|
||||||
|
show_notification(self.stdscr, ['No results found'])
|
||||||
|
|
||||||
@SubredditController.register('/')
|
@SubredditController.register('/')
|
||||||
def prompt_subreddit(self):
|
def prompt_subreddit(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user