Fix misuse of exists()

Should be os.path.exists not os.exists

Part of bug 1078062

Change-Id: I8126c496b3089ab65ce3b8c7fdcd84944b8e259f
This commit is contained in:
Yun Mao 2012-11-12 14:05:29 -05:00
parent 6a63baadae
commit c4b1a647de
1 changed files with 1 additions and 1 deletions

View File

@ -788,7 +788,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 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)
with tempfile.NamedTemporaryFile(dir=CONF.volume_tmp_dir) as tmp: