Skip to content

Commit

Permalink
crude fix for test_failed_login test
Browse files Browse the repository at this point in the history
  • Loading branch information
balta2ar committed Feb 21, 2020
1 parent 90c84b3 commit 49fc0ea
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion edx_dl/edx_dl.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,12 @@ def edx_login(url, headers, username, password):
'remember': False}).encode('utf-8')

request = Request(url, post_data, headers)
response = urlopen(request)
try:
response = urlopen(request)
except HTTPError as e:
logging.info('Error, cannot login: %s', e)
return {'success': False}

resp = json.loads(response.read().decode('utf-8'))

return resp
Expand Down

0 comments on commit 49fc0ea

Please sign in to comment.