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
|
||||
import praw
|
||||
from requests.exceptions import ConnectionError, HTTPError
|
||||
from praw.errors import InvalidUserPass
|
||||
|
||||
from rtv.errors import SubmissionURLError, SubredditNameError
|
||||
from rtv.utils import curses_session, load_config
|
||||
@@ -94,6 +95,9 @@ def main():
|
||||
page = SubredditPage(stdscr, reddit, args.subreddit)
|
||||
page.loop()
|
||||
|
||||
except InvalidUserPass:
|
||||
print('Invalid password for username: ' + args.username)
|
||||
|
||||
except KeyboardInterrupt:
|
||||
return
|
||||
|
||||
|
||||
Reference in new issue
Block a user