Improved config error reporting.

This commit is contained in:
Michael Lazar
2016-02-10 00:35:51 -08:00
parent d08b9f47be
commit a0da5fc6ca
7 changed files with 24 additions and 26 deletions

View File

@@ -10,7 +10,6 @@ from .page import Page, PageController, logged_in
from .objects import Navigator, Color, Command
from .submission import SubmissionPage
from .subscription import SubscriptionPage
from .terminal import Terminal
class SubredditController(PageController):
@@ -25,10 +24,10 @@ class SubredditPage(Page):
name (string): Name of subreddit to open
url (string): Optional submission to load upon start
"""
super(SubredditPage, self).__init__(reddit, term, config, oauth)
self.content = SubredditContent.from_name(reddit, name, term.loader)
self.controller = SubredditController(self, keymap=config.keymap)
super(SubredditPage, self).__init__(reddit, term, config, oauth)
self.content = SubredditContent.from_name(reddit, name, term.loader)
self.nav = Navigator(self.content.get)
@SubredditController.register(Command('REFRESH'))