Fix misuse of exists()
Should be os.path.exists not os.exists Part of bug 1078062 Change-Id: I8126c496b3089ab65ce3b8c7fdcd84944b8e259f
This commit is contained in:
parent
6a63baadae
commit
c4b1a647de
@ -788,7 +788,7 @@ class RBDDriver(VolumeDriver):
|
|||||||
# TODO(jdurgin): replace with librbd
|
# TODO(jdurgin): replace with librbd
|
||||||
# this is a temporary hack, since rewriting this driver
|
# this is a temporary hack, since rewriting this driver
|
||||||
# to use librbd would take too long
|
# to use librbd would take too long
|
||||||
if CONF.volume_tmp_dir and not os.exists(CONF.volume_tmp_dir):
|
if CONF.volume_tmp_dir and not os.path.exists(CONF.volume_tmp_dir):
|
||||||
os.makedirs(CONF.volume_tmp_dir)
|
os.makedirs(CONF.volume_tmp_dir)
|
||||||
|
|
||||||
with tempfile.NamedTemporaryFile(dir=CONF.volume_tmp_dir) as tmp:
|
with tempfile.NamedTemporaryFile(dir=CONF.volume_tmp_dir) as tmp:
|
||||||
|
Loading…
Reference in New Issue
Block a user