]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fix UnboundLocalError in TgtAdm.update_iscsi_target
authorYuriy Taraday <yorik.sar@gmail.com>
Sun, 19 Jan 2014 19:08:06 +0000 (23:08 +0400)
committerYuriy Taraday <yorik.sar@gmail.com>
Mon, 20 Jan 2014 04:46:26 +0000 (08:46 +0400)
Closes-Bug: #1270624
Change-Id: I74a057a9603c5d6aefaec6db62228352b739df56

cinder/brick/iscsi/iscsi.py

index aafc532eabf3066f3e0b9814d7369d40a2d27bff..a3fcc62065fa95b80c488c1d2efdb0b0cb584c9a 100644 (file)
@@ -250,8 +250,8 @@ class TgtAdm(TargetAdmin):
         except putils.ProcessExecutionError as e:
             LOG.error(_("Failed to update iscsi target %(name)s: %(e)s") %
                       {'name': name, 'e': str(e)})
-            LOG.debug("StdOut from tgt-admin --update: %s" % out)
-            LOG.debug("StdErr from tgt-admin --update: %s" % err)
+            LOG.debug("StdOut from tgt-admin --update: %s", e.stdout)
+            LOG.debug("StdErr from tgt-admin --update: %s", e.stderr)
             raise exception.ISCSITargetUpdateFailed(name=name)
 
     def remove_iscsi_target(self, tid, lun, vol_id, vol_name, **kwargs):