Skip to content

Commit

Permalink
Merge pull request #97 from jathanism/auth_token-fix
Browse files Browse the repository at this point in the history
Bugfix in auth_token authentication to work w/ NSoT 0.17.
  • Loading branch information
jathanism committed Apr 1, 2016
2 parents d19b2d2 + 6d07235 commit 85f0b4c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions pynsot/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,16 +274,16 @@ def get_token(self, base_url, email, secret_key):
try:
url = base_url + '/authenticate/'
headers = {'content-type': 'application/json'}
r = slumber.requests.post(
resp = slumber.requests.post(
url, data=json.dumps(data), headers=headers
)
except Exception as err:
log.debug('Got error: %s' % (err,))
self.client.error(err)

if r.ok:
log.debug('Got response: %r' % (r,))
result = get_result(r.json())
if resp.ok:
log.debug('Got response: %r' % (resp,))
result = get_result(resp)['auth_token']
return result
else:
msg = 'Failed to fetch auth_token from %s' % base_url
Expand Down
2 changes: 1 addition & 1 deletion pynsot/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.20'
__version__ = '0.20.1'
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-r requirements.txt
fake-factory==0.5.0
nsot==0.15.6
nsot==0.17
py==1.4.26
pytest==2.7.0
pytest-django==2.9.1
Expand Down

0 comments on commit 85f0b4c

Please sign in to comment.