diff options
Diffstat (limited to 'nova/utils.py')
-rw-r--r-- | nova/utils.py | 6 |
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: |