提交 6fc6e664 编写于 作者: J Joerg Jaspert

utils.py

stop using mktemp and use mkstemp instead
Signed-off-by: NJoerg Jaspert <joerg@debian.org>
上级 fea9062a
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册