Issue brought up on youtube video by InzMovi

pull/38/head
David Trail 10 years ago
parent f162fe87c0
commit ab2680ea8a

@ -11,7 +11,7 @@ from datetime import datetime, timedelta
import praw import praw
from praw.errors import InvalidUser, InvalidUserPass, RateLimitExceeded, \ from praw.errors import InvalidUser, InvalidUserPass, RateLimitExceeded, \
HTTPException HTTPException, OAuthAppRequired
from praw.objects import Comment, Submission from praw.objects import Comment, Submission
try: try:
@ -78,7 +78,7 @@ def login(user=None, password=None):
r.refresh_access_information() r.refresh_access_information()
if verbose: if verbose:
print("Logged in with OAuth.") print("Logged in with OAuth.")
except HTTPException: except (HTTPException, OAuthAppRequired) as e:
try: try:
if user and password: if user and password:
r.login(_user, _pass) r.login(_user, _pass)

Loading…
Cancel
Save