Revision 3a074de0
b/kamaki/clients/astakos.py | ||
---|---|---|
37 | 37 |
class AstakosClient(Client): |
38 | 38 |
"""GRNet Astakos API client""" |
39 | 39 |
|
40 |
def raise_for_status(self, r): |
|
41 |
msg = r.text.strip() |
|
42 |
if msg: |
|
43 |
raise ClientError(msg, r.status_code) |
|
44 |
else: |
|
45 |
# Fallback to the default |
|
46 |
super(AstakosClient, self).raise_for_status(r) |
|
47 |
|
|
40 | 48 |
def authenticate(self): |
41 | 49 |
r = self.get('/im/authenticate') |
42 | 50 |
return r.json |
Also available in: Unified diff