projects
/
kamaki
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8f5f310
)
Improve error reporting in astakos
author
Giorgos Verigakis
<verigak@gmail.com>
Tue, 13 Mar 2012 14:25:30 +0000
(16:25 +0200)
committer
Giorgos Verigakis
<verigak@gmail.com>
Wed, 9 May 2012 10:18:45 +0000
(13:18 +0300)
kamaki/clients/astakos.py
patch
|
blob
|
history
diff --git
a/kamaki/clients/astakos.py
b/kamaki/clients/astakos.py
index
db082c5
..
89798bb
100644
(file)
--- a/
kamaki/clients/astakos.py
+++ b/
kamaki/clients/astakos.py
@@
-37,6
+37,14
@@
from . import Client, ClientError
class AstakosClient(Client):
"""GRNet Astakos API client"""
+ def raise_for_status(self, r):
+ msg = r.text.strip()
+ if msg:
+ raise ClientError(msg, r.status_code)
+ else:
+ # Fallback to the default
+ super(AstakosClient, self).raise_for_status(r)
+
def authenticate(self):
r = self.get('/im/authenticate')
return r.json