Spelling.
This commit is contained in:
@@ -155,7 +155,7 @@ RTV's login process follows the steps below:
|
||||
1. You initiate a login by pressing the ``u`` key.
|
||||
2. You're redirected to a webbrowser where reddit will ask you to login and authorize RTV.
|
||||
3. RTV uses the generated token to login on your behalf.
|
||||
4. The token is stored on your computer at ``~/.config/rtv/refresh-token`` for future sessions. You can disable this by setting ``persistant=False`` in your RTV config.
|
||||
4. The token is stored on your computer at ``~/.config/rtv/refresh-token`` for future sessions. You can disable this by setting ``persistent=False`` in your RTV config.
|
||||
|
||||
.. [#] `<https://github.com/reddit/reddit/wiki/OAuth2>`_
|
||||
|
||||
@@ -187,9 +187,9 @@ Example initial config:
|
||||
# This may be necessary for compatibility with some terminal browsers
|
||||
# ascii=True
|
||||
|
||||
# Enable persistant storage of your authentication token
|
||||
# Enable persistent storage of your authentication token
|
||||
# This allows you to remain logged in when you restart the program
|
||||
persistant=True
|
||||
persistent=True
|
||||
|
||||
|
||||
===
|
||||
|
||||
@@ -38,7 +38,7 @@ def command_line():
|
||||
parser.add_argument('-l', dest='link', help='full URL of a submission that will be opened on start')
|
||||
parser.add_argument('--ascii', action='store_true', help='enable ascii-only mode')
|
||||
parser.add_argument('--log', metavar='FILE', action='store', help='log HTTP requests to a file')
|
||||
parser.add_argument('--non-persistant', dest='persistant', action='store_false', help='Forget all authenticated users when the program exits')
|
||||
parser.add_argument('--non-persistent', dest='persistent', action='store_false', help='Forget all authenticated users when the program exits')
|
||||
parser.add_argument('--clear-auth', dest='clear_auth', action='store_true', help='Remove any saved OAuth tokens before starting')
|
||||
args = parser.parse_args()
|
||||
|
||||
@@ -68,8 +68,8 @@ def main():
|
||||
|
||||
if args.ascii:
|
||||
config.unicode = False
|
||||
if not args.persistant:
|
||||
config.persistant = False
|
||||
if not args.persistent:
|
||||
config.persistent = False
|
||||
if args.log:
|
||||
logging.basicConfig(level=logging.DEBUG, filename=args.log)
|
||||
if args.clear_auth:
|
||||
|
||||
@@ -10,7 +10,7 @@ CONFIG = os.path.join(XDG_HOME, 'rtv', 'rtv.cfg')
|
||||
TOKEN = os.path.join(XDG_HOME, 'rtv', 'refresh-token')
|
||||
|
||||
unicode = True
|
||||
persistant = True
|
||||
persistent = True
|
||||
|
||||
# https://github.com/reddit/reddit/wiki/OAuth2
|
||||
# Client ID is of type "installed app" and the secret should be left empty
|
||||
|
||||
@@ -101,7 +101,7 @@ class OAuthTool(object):
|
||||
with self.loader(message='Logging in'):
|
||||
access_info = self.reddit.get_access_information(oauth_code)
|
||||
self.refresh_token = access_info['refresh_token']
|
||||
if config.persistant:
|
||||
if config.persistent:
|
||||
config.save_refresh_token(access_info['refresh_token'])
|
||||
except (praw.errors.OAuthAppRequired, praw.errors.OAuthInvalidToken):
|
||||
show_notification(self.stdscr, ['Invalid OAuth data'])
|
||||
|
||||
Reference in New Issue
Block a user