From: Joerg Jaspert Date: Fri, 23 Jan 2009 23:05:00 +0000 (+0100) Subject: utils.py X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6fc6e6646071c736803bd1b5f41cb1367fd1bc31;p=dak utils.py stop using mktemp and use mkstemp instead Signed-off-by: Joerg Jaspert --- 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)