Fix bug with login where invalid password throws unhandeled exception in
issue #24
This commit is contained in:
1 parent
8201460e9c
commit
0fdae713a5
1 file changed
+4
@@ -2,6 +2,7 @@ import argparse
|
|||||||
from getpass import getpass
|
from getpass import getpass
|
||||||
import praw
|
import praw
|
||||||
from requests.exceptions import ConnectionError, HTTPError
|
from requests.exceptions import ConnectionError, HTTPError
|
||||||
|
from praw.errors import InvalidUserPass
|
||||||
|
|
||||||
from rtv.errors import SubmissionURLError, SubredditNameError
|
from rtv.errors import SubmissionURLError, SubredditNameError
|
||||||
from rtv.utils import curses_session, load_config
|
from rtv.utils import curses_session, load_config
|
||||||
@@ -94,6 +95,9 @@ def main():
|
|||||||
page = SubredditPage(stdscr, reddit, args.subreddit)
|
page = SubredditPage(stdscr, reddit, args.subreddit)
|
||||||
page.loop()
|
page.loop()
|
||||||
|
|
||||||
|
except InvalidUserPass:
|
||||||
|
print('Invalid password for username: ' + args.username)
|
||||||
|
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user