From 56778a1220eb1e15e1edea3e0ffed57e8bdd0fb4 Mon Sep 17 00:00:00 2001 From: Lin Yang Date: Thu, 30 Apr 2015 18:28:21 +0800 Subject: [PATCH] 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 --- cinderclient/exceptions.py | 6 +++--- 1 file 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: