From 6fc6e6646071c736803bd1b5f41cb1367fd1bc31 Mon Sep 17 00:00:00 2001 From: Joerg Jaspert Date: Sat, 24 Jan 2009 00:05:00 +0100 Subject: [PATCH] utils.py stop using mktemp and use mkstemp instead Signed-off-by: Joerg Jaspert --- daklib/utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/daklib/utils.py b/daklib/utils.py index f07b6171..0fa3eaa6 100755 --- a/daklib/utils.py +++ b/daklib/utils.py @@ -569,8 +569,7 @@ switched to 'email (name)' format.""" def send_mail (message, filename=""): # If we've been passed a string dump it into a temporary file if message: - filename = tempfile.mktemp() - fd = os.open(filename, os.O_RDWR|os.O_CREAT|os.O_EXCL, 0700) + (fd, filename) = tempfile.mkstemp() os.write (fd, message) os.close (fd) -- 2.39.5