Skip to content

Commit

Permalink
See #16: Fix exception imports for requests transport.
Browse files Browse the repository at this point in the history
  • Loading branch information
Owen Jacobson committed Apr 5, 2012
1 parent a2d257c commit f2db5f7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion refreshbooks/transports/use_requests.py
@@ -1,5 +1,7 @@
import requests

from refreshbooks import exceptions as exc

class Transport(object):
def __init__(self, url, headers_factory):
self.url = url
Expand All @@ -13,6 +15,6 @@ def __call__(self, entity):
data=entity
)
if resp.status_code >= 400:
raise TransportException(resp.status, content)
raise exc.TransportException(resp.status, content)

return resp.content

0 comments on commit f2db5f7

Please sign in to comment.