diff options
author | Jenkins <jenkins@review.openstack.org> | 2013-06-03 00:44:22 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2013-06-03 00:44:22 +0000 |
commit | 0afcc051a99443004510458da32e507385d58873 (patch) | |
tree | b06c62a5dd16ae359983fb9d5e263c479aa91061 /nova/utils.py | |
parent | be264a9a77e236259a5060ff31882f46759a6413 (diff) | |
parent | a3f28804004805b5f151fc9147ac281d029a4393 (diff) | |
download | nova-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.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: |