]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
CoraidDriver: typo in _login exception handler
authorJean-Baptiste RANSY <jean-baptiste.ransy@alyseo.com>
Thu, 21 Mar 2013 10:51:37 +0000 (11:51 +0100)
committerjohn-griffith <john.griffith@solidfire.com>
Sat, 23 Mar 2013 21:37:10 +0000 (15:37 -0600)
In cinder/volume/drivers/coraid.py, _login method, if login is
unsuccessful, we try to get the message from an undefined
object "response". Instead we should be getting it from "reply".

- errmsg = response.get('message', '')
+ errmsg = reply.get('message', '')

Fixes bug 1157499

Change-Id: Ifd047ced6b40f49881e81d4e73189d9bd216c903
(cherry picked from commit 4403230bbe8f39a19c38e58840bbb2283ccd808f)

cinder/volume/drivers/coraid.py

index 8471a0b66ddb257ba08d3392800f61ab814e958b..050cff0143d7c865eabab73d2a68c9485318e460 100644 (file)
@@ -98,7 +98,7 @@ class CoraidRESTClient(object):
                 LOG.debug(msg % dict(session=self.session))
                 return True
             else:
-                errmsg = response.get('message', '')
+                errmsg = reply.get('message', '')
                 msg = _('Message : %(message)s')
                 raise CoraidESMException(msg % dict(message=errmsg))
         return True