changed password to a getpass prompt for all sorts of security reasons
This commit is contained in:
@@ -6,6 +6,8 @@ from rtv.errors import SubmissionURLError, SubredditNameError
|
|||||||
from rtv.utils import curses_session
|
from rtv.utils import curses_session
|
||||||
from rtv.subreddit import SubredditPage
|
from rtv.subreddit import SubredditPage
|
||||||
from rtv.submission import SubmissionPage
|
from rtv.submission import SubmissionPage
|
||||||
|
import ConfigParser
|
||||||
|
from getpass import getpass
|
||||||
|
|
||||||
description = """
|
description = """
|
||||||
Reddit Terminal Viewer is a lightweight browser for www.reddit.com built into a
|
Reddit Terminal Viewer is a lightweight browser for www.reddit.com built into a
|
||||||
@@ -30,7 +32,6 @@ def main():
|
|||||||
|
|
||||||
group = parser.add_argument_group('authentication (optional)')
|
group = parser.add_argument_group('authentication (optional)')
|
||||||
group.add_argument('-u', dest='username', help='reddit username')
|
group.add_argument('-u', dest='username', help='reddit username')
|
||||||
group.add_argument('-p', dest='password', help='reddit password')
|
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
@@ -38,8 +39,9 @@ def main():
|
|||||||
reddit = praw.Reddit(user_agent='reddit terminal viewer v0.0')
|
reddit = praw.Reddit(user_agent='reddit terminal viewer v0.0')
|
||||||
reddit.config.decode_html_entities = True
|
reddit.config.decode_html_entities = True
|
||||||
|
|
||||||
if args.username and args.password:
|
if args.username:
|
||||||
reddit.login(args.username, args.password)
|
password = getpass()
|
||||||
|
reddit.login(args.username, password)
|
||||||
|
|
||||||
with curses_session() as stdscr:
|
with curses_session() as stdscr:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user