Error handling

This commit is contained in:
Théo Piboubès
2015-08-20 13:34:37 +02:00
parent 9e27bee7e6
commit e7ad6067d2
2 changed files with 5 additions and 5 deletions

View File

@@ -117,7 +117,8 @@ class OAuthTool(object):
access_token=self.access_info['access_token'],
refresh_token=self.access_info['refresh_token'])
self.set_token_expiration()
except (praw.errors.OAuthAppRequired, praw.errors.OAuthInvalidToken) as e:
except (praw.errors.OAuthAppRequired, praw.errors.OAuthInvalidToken,
praw.errors.HTTPException) as e:
show_notification(self.stdscr, ['Invalid OAuth data'])
else:
self.config['oauth']['access_token'] = self.access_info['access_token']