[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master] utils.py



stop using mktemp and use mkstemp instead

Signed-off-by: Joerg Jaspert <joerg@debian.org>
---
 daklib/utils.py |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

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



Reply to: