Skip to content

Commit

Permalink
Improved catching HTTP error responses
Browse files Browse the repository at this point in the history
  • Loading branch information
drpancake committed Jan 13, 2012
1 parent 9bbcfb5 commit 3987111
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion open_facebook/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def _request(cls, url, post_data=None, timeout=REQUEST_TIMEOUT,
timeout=timeout)
except (urllib2.HTTPError,), e:
# catch the silly status code errors
if 'HTTP Error' in unicode(e):
if 'http error' in str(e).lower():
response_file = e
else:
raise
Expand Down

0 comments on commit 3987111

Please sign in to comment.