summaryrefslogtreecommitdiff
path: root/cinderclient/exceptions.py
diff options
context:
space:
mode:
authorLin Yang <lin.a.yang@intel.com>2015-04-30 18:28:21 +0800
committerLin Yang <lin.a.yang@intel.com>2015-07-02 15:51:59 +0800
commit56778a1220eb1e15e1edea3e0ffed57e8bdd0fb4 (patch)
treee3db24cf2ccc9cf91fa3e8f8760a5433999fd7ae /cinderclient/exceptions.py
parent167a75156de71aa2c1dcf963d76b9a08cee33bbf (diff)
downloadpython-cinderclient-56778a1220eb1e15e1edea3e0ffed57e8bdd0fb4.tar.gz
Fix typo in comment message
an request => a request rest => resp exception_from_response() => exceptions.from_response() '.' operator means call from_response() in exceptions module. Change-Id: I5e780dd2882b39d1b39f7c64bf274e90934c09ec Signed-off-by: Lin Yang <lin.a.yang@intel.com>
Diffstat (limited to 'cinderclient/exceptions.py')
-rw-r--r--cinderclient/exceptions.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/cinderclient/exceptions.py b/cinderclient/exceptions.py
index cf259bf..4987f24 100644
--- a/cinderclient/exceptions.py
+++ b/cinderclient/exceptions.py
@@ -157,14 +157,14 @@ _code_map = dict((c.http_status, c) for c in [BadRequest, Unauthorized,
def from_response(response, body):
"""
- Return an instance of an ClientException or subclass
- based on an requests response.
+ Return an instance of a ClientException or subclass
+ based on a requests response.
Usage::
resp, body = requests.request(...)
if resp.status_code != 200:
- raise exception_from_response(resp, rest.text)
+ raise exceptions.from_response(resp, resp.text)
"""
cls = _code_map.get(response.status_code, ClientException)
if response.headers: