summaryrefslogtreecommitdiffstats
path: root/nova/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'nova/utils.py')
-rw-r--r--nova/utils.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/nova/utils.py b/nova/utils.py
index 97551e8eb..94c425cc1 100644
--- a/nova/utils.py
+++ b/nova/utils.py
@@ -920,8 +920,10 @@ def temporary_chown(path, owner_uid=None):
@contextlib.contextmanager
def tempdir(**kwargs):
- tempfile.tempdir = CONF.tempdir
- tmpdir = tempfile.mkdtemp(**kwargs)
+ argdict = kwargs.copy()
+ if 'dir' not in argdict:
+ argdict['dir'] = CONF.tempdir
+ tmpdir = tempfile.mkdtemp(**argdict)
try:
yield tmpdir
finally: