Removed getpass to let the praw library take care of it.
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
import argparse
|
import argparse
|
||||||
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 praw.errors import InvalidUserPass
|
||||||
@@ -59,11 +58,7 @@ def main():
|
|||||||
reddit.config.decode_html_entities = True
|
reddit.config.decode_html_entities = True
|
||||||
|
|
||||||
if args.username:
|
if args.username:
|
||||||
if args.password:
|
|
||||||
reddit.login(args.username, args.password)
|
reddit.login(args.username, args.password)
|
||||||
else:
|
|
||||||
password = getpass()
|
|
||||||
reddit.login(args.username, password)
|
|
||||||
|
|
||||||
with curses_session() as stdscr:
|
with curses_session() as stdscr:
|
||||||
|
|
||||||
|
|||||||
2
setup.py
2
setup.py
@@ -13,7 +13,7 @@ setup(
|
|||||||
license='MIT',
|
license='MIT',
|
||||||
keywords='reddit terminal praw curses',
|
keywords='reddit terminal praw curses',
|
||||||
packages=['rtv'],
|
packages=['rtv'],
|
||||||
install_requires=['praw', 'six', 'requests'],
|
install_requires=['praw>=2.1.6', 'six', 'requests'],
|
||||||
entry_points={'console_scripts': ['rtv=rtv.main:main']},
|
entry_points={'console_scripts': ['rtv=rtv.main:main']},
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Intended Audience :: End Users/Desktop',
|
'Intended Audience :: End Users/Desktop',
|
||||||
|
|||||||
Reference in New Issue
Block a user