On 07/19/2011 10:53 PM, James Antill wrote:
> ---
> yum/__init__.py | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/yum/__init__.py b/yum/__init__.py
> index 12c2bdd..3f7f619 100644
> --- a/yum/__init__.py
> +++ b/yum/__init__.py
> @@ -5242,7 +5242,8 @@ class YumBase(depsolve.Depsolve):
>
> if not filename:
> prefix = 'yum_save_tx-%s' % time.strftime('%Y-%m-%d-%H-%M')
> - fd,filename = tempfile.mkstemp(suffix='.yumtx', prefix=prefix)
> + fd,filename = tempfile.mkstemp(suffix='.yumtx', prefix=prefix,
> + dir=os.getenv('TMPDIR'))
I think mkstemp() takes TMPDIR into account automatically.
$ TMPDIR= python -c "import tempfile; print tempfile.mkstemp()"
(3, '/tmp/tmpGLrxRr')
$ TMPDIR=/var/tmp python -c "import tempfile; print tempfile.mkstemp()"
(3, '/var/tmp/tmpI5k6CO')
_______________________________________________
Yum-devel mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum-devel