diff --git a/README.rst b/README.rst index 12a515c..dbc6aa3 100644 --- a/README.rst +++ b/README.rst @@ -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. .. [#] ``_ @@ -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 === diff --git a/rtv/__main__.py b/rtv/__main__.py index 422f663..06d0e19 100644 --- a/rtv/__main__.py +++ b/rtv/__main__.py @@ -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: diff --git a/rtv/config.py b/rtv/config.py index 6d681e1..1eda2be 100644 --- a/rtv/config.py +++ b/rtv/config.py @@ -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 diff --git a/rtv/oauth.py b/rtv/oauth.py index 88e4978..62aee86 100644 --- a/rtv/oauth.py +++ b/rtv/oauth.py @@ -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'])