diff --git a/daklib/utils.py b/daklib/utils.py index f07b6171d71c16bdceb1c9c23dd9f70b1523505c..0fa3eaa602153db6dc832a4795de7c055de0823b 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)