summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>2015-06-24 00:46:48 +0000
committerKen'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>2015-06-24 01:17:23 +0000
commit31662cad4e2297b0aa681baac2b7a20eb2efb079 (patch)
treef0a85072da6da4d97ae39b069b6fc03ccf1519d3
parent8f67d9f38ba3ef253c2e157767d2dcbe678cab10 (diff)
downloadtempest-lib-0.6.1.tar.gz
Make resp_body optional on RestClientException0.6.1
The commit Ie1bb259e7e683081f0ad127617acc8deb98467c0 adds resp_body to RestClientException, but it broke some unit tests of Tempest because NotFound calls don't pass the resp_body. So the above commit was backwards incompatible changes, this patch makes resp_body optional for avoiding affecting to the other projects. Change-Id: Ic75f0673f27fb23c2784f2f8dbceab70061d3823
-rw-r--r--tempest_lib/exceptions.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tempest_lib/exceptions.py b/tempest_lib/exceptions.py
index d6f518c..887c9b0 100644
--- a/tempest_lib/exceptions.py
+++ b/tempest_lib/exceptions.py
@@ -47,7 +47,7 @@ class TempestException(Exception):
class RestClientException(TempestException,
testtools.TestCase.failureException):
- def __init__(self, resp_body, *args, **kwargs):
+ def __init__(self, resp_body=None, *args, **kwargs):
self.resp_body = resp_body
message = kwargs.get("message", resp_body)
super(RestClientException, self).__init__(message, *args, **kwargs)