From 31662cad4e2297b0aa681baac2b7a20eb2efb079 Mon Sep 17 00:00:00 2001 From: Ken'ichi Ohmichi Date: Wed, 24 Jun 2015 00:46:48 +0000 Subject: Make resp_body optional on RestClientException 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 --- tempest_lib/exceptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tempest_lib/exceptions.py') 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) -- cgit v1.2.1