]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
LIO: Fix UnboundLocalError in ensure_export
authorEric Harney <eharney@redhat.com>
Thu, 30 Oct 2014 20:33:40 +0000 (16:33 -0400)
committerEric Harney <eharney@redhat.com>
Thu, 30 Oct 2014 20:50:01 +0000 (16:50 -0400)
commitdac4e044660b20eb4aed80cfe58cd9d5b88e14a7
tree5a2f8725b3b8ddb870cb897cd05b7d6f06882f39
parent31d73fa9bc1a0cf5165420941f288de1879181f4
LIO: Fix UnboundLocalError in ensure_export

If db.volume_get() fails here, volume_info (and chap_auth)
are unbound, and the below usages will fail.

volume_get() failing is the only way to land in the NotFound
handler, so just remove this debug line.  It won't ever have
info to print.

Move code not related to db lookup out of this try block, and
return when NotFound occurs.

Closes-Bug: #1387866

Change-Id: I13a88bec1a66d8a0794b08514cc9844d60f6c809
cinder/volume/iscsi.py