I want to catch a specific http error and not any one of the entire family..
what I was trying to do is --
urllib2.HTTPError, handle it, and if it's not Error 404, simply use
raise to re-raise the exception.
See the Python tutorial.
So you could do:
import urllib2 try: urllib2.urlopen("some url") except urllib2.HTTPError as err: if err.code == 404: <whatever> else: raise