Skip to content

Commit

Permalink
Use new syntax for catching exceptions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rogério Brito committed May 3, 2013
1 parent 3fee870 commit 942899d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion coursera/coursera_dl.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ def download_file_nowget(url, fn, cookies_file):
opener.addheaders.append(('Cookie', 'csrf_token=%s;session=%s' %
(csrftoken, session)))
urlfile = opener.open(url)
except urllib2.HTTPError,e:
except urllib2.HTTPError as e:
logging.warn('Probably the file is missing from the AWS repository...'
' waiting.')
error_msg = e.reason + ' ' + str(e.code)
Expand Down

0 comments on commit 942899d

Please sign in to comment.