I want to grab the HTTP status code once it raises a URLError exception:
I tried this but didn\'t help:
except URLError, e: logger.warning( \'It see
Not sure why you are getting this error. If you are using urllib2 this should help:
urllib2
import urllib2 from urllib2 import URLError try: urllib2.urlopen(url) except URLError, e: print e.code