Fix typo so setting volume_tmp_dir works

apply the same change that was applied to cinder
https://review.openstack.org/#/c/14863/

Fixes LP bug #1071536

Change-Id: I4cfdb38debfcb4a890c2d7fd7405ac9dc755f0ec
(cherry picked from commit 3f1af292f4)
This commit is contained in:
Davanum Srinivas 2012-11-07 20:21:55 -05:00 committed by Vishvananda Ishaya
parent 197398fdf6
commit c2a915021f

View File

@ -845,7 +845,7 @@ class RBDDriver(VolumeDriver):
# TODO(jdurgin): replace with librbd
# this is a temporary hack, since rewriting this driver
# to use librbd would take too long
if FLAGS.volume_tmp_dir and not os.exists(FLAGS.volume_tmp_dir):
if FLAGS.volume_tmp_dir and not os.path.exists(FLAGS.volume_tmp_dir):
os.makedirs(FLAGS.volume_tmp_dir)
with tempfile.NamedTemporaryFile(dir=FLAGS.volume_tmp_dir) as tmp: