Updated README, added "persistant" option to config and command line.

This commit is contained in:
Michael Lazar
2015-09-20 22:56:24 -07:00
parent 80bf45078a
commit 44c4eeca62
4 changed files with 31 additions and 32 deletions

View File

@@ -100,8 +100,9 @@ class OAuthTool(object):
try:
with self.loader(message='Logging in'):
access_info = self.reddit.get_access_information(oauth_code)
config.save_refresh_token(access_info['refresh_token'])
self.refresh_token = access_info['refresh_token']
if config.persistant:
config.save_refresh_token(access_info['refresh_token'])
except (praw.errors.OAuthAppRequired, praw.errors.OAuthInvalidToken):
show_notification(self.stdscr, ['Invalid OAuth data'])
else: