summaryrefslogtreecommitdiffstats
path: root/nova/utils.py
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-06-03 00:44:22 +0000
committerGerrit Code Review <review@openstack.org>2013-06-03 00:44:22 +0000
commit0afcc051a99443004510458da32e507385d58873 (patch)
treeb06c62a5dd16ae359983fb9d5e263c479aa91061 /nova/utils.py
parentbe264a9a77e236259a5060ff31882f46759a6413 (diff)
parenta3f28804004805b5f151fc9147ac281d029a4393 (diff)
downloadnova-0afcc051a99443004510458da32e507385d58873.tar.gz
nova-0afcc051a99443004510458da32e507385d58873.tar.xz
nova-0afcc051a99443004510458da32e507385d58873.zip
Merge "In utils.tempdir, pass CONF.tempdir as an argument."
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: