Revision 8a019a03 lib/rapi/client.py
b/lib/rapi/client.py | ||
---|---|---|
74 | 74 |
"""Generic error raised from Ganeti API. |
75 | 75 |
|
76 | 76 |
""" |
77 |
pass |
|
77 |
def __init__(self, msg, code=None): |
|
78 |
Error.__init__(self, msg) |
|
79 |
self.code = code |
|
78 | 80 |
|
79 | 81 |
|
80 | 82 |
class InvalidReplacementMode(Error): |
... | ... | |
414 | 416 |
else: |
415 | 417 |
msg = str(response_content) |
416 | 418 |
|
417 |
raise GanetiApiError(msg) |
|
419 |
raise GanetiApiError(msg, code=resp.code)
|
|
418 | 420 |
|
419 | 421 |
return response_content |
420 | 422 |
|
Also available in: Unified diff