Skip to content

Instantly share code, notes, and snippets.

@marksteve
Created May 4, 2011 10:35
Show Gist options
  • Select an option

  • Save marksteve/955055 to your computer and use it in GitHub Desktop.

Select an option

Save marksteve/955055 to your computer and use it in GitHub Desktop.
try:
# do something
except RequestError, response:
# handle exception
# response is an object
# dir(response) == ['__class__', '__delattr__', '__dict__', '__doc__', '__getattribute__', '__getitem__', '__getslice__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__setstate__', '__str__', '__weakref__', 'args', 'body', 'headers', 'message', 'reason', 'status']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment