From b8ea32bcb7a440107c5087a65712f39864a1f9bb Mon Sep 17 00:00:00 2001 From: David Shea Date: Jul 09 2015 20:38:29 +0000 Subject: Use tempfile.mkdtemp instead of tempfile.mktemp mktemp may not be secure or reliable since there is a delay between returning the name and creating the directory. Signed-off-by: Jan Hutar --- diff --git a/rpmfluff.py b/rpmfluff.py index c06ff91..21f787a 100755 --- a/rpmfluff.py +++ b/rpmfluff.py @@ -1162,8 +1162,7 @@ class YumRepoBuild: def __init__(self, rpmBuilds): """@type rpmBuilds: list of L{RpmBuild} instances""" import tempfile - self.repoDir = tempfile.mktemp() - os.mkdir(self.repoDir) + self.repoDir = tempfile.mkdtemp() self.rpmBuilds = rpmBuilds def make(self, arch):