Skip to content
This repository has been archived by the owner on Apr 1, 2019. It is now read-only.

Commit

Permalink
support newer version of requests
Browse files Browse the repository at this point in the history
  • Loading branch information
mihait committed Mar 6, 2013
1 parent 55835cb commit 625159c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion vaporize/core.py
Expand Up @@ -83,7 +83,14 @@ def connect(user, apikey, region='DFW'):
url = endpoint['publicURL']
_settings[name + '_url'] = url
auth = Auth(_settings['token'])
_session = requests.session(auth=auth, headers=headers)
try:
_session = requests.session(auth=auth, headers=headers)
except TypeError:
_session = requests.Session()
_session.auth = auth
_session.headers.update(headers)
except Exception, e:
raise
else:
raise ConnectionError("HTTP %d: %s" % (response.status_code,
response.content))
Expand Down

0 comments on commit 625159c

Please sign in to comment.