summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-01-16 07:59:41 +0000
committerZac Medico <zmedico@gentoo.org>2007-01-16 07:59:41 +0000
commit404f8cbf462c75736c6cdb754bd9550f4c2763fb (patch)
treec9f67b9db8db9feb9fc0788ab3c51e2698d5148d
parentFix broken commitmessagefile handling. (diff)
downloadportage-multirepo-404f8cbf462c75736c6cdb754bd9550f4c2763fb.tar.gz
portage-multirepo-404f8cbf462c75736c6cdb754bd9550f4c2763fb.tar.bz2
portage-multirepo-404f8cbf462c75736c6cdb754bd9550f4c2763fb.zip
Replace mktemp with mkstemp since the former is deprecated for security reasons.
svn path=/main/trunk/; revision=5669
-rwxr-xr-xbin/repoman8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/repoman b/bin/repoman
index a9c05c6c..772c0da3 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -1600,8 +1600,8 @@ else:
commitmessage+="\n(Portage version: Unknown)"
if myupdates or myremoved:
myfiles = myupdates + myremoved
- commitmessagefile=tempfile.mktemp(".repoman.msg")
- mymsg=open(commitmessagefile,"w")
+ fd, commitmessagefile = tempfile.mkstemp(".repoman.msg")
+ mymsg = os.fdopen(fd, "w")
mymsg.write(commitmessage)
mymsg.close()
@@ -1752,8 +1752,8 @@ else:
if "--pretend" in myoptions:
print "(/usr/bin/cvs -q commit -F "+commitmessagefile+")"
else:
- commitmessagefile = tempfile.mktemp(".repoman.msg")
- mymsg=open(commitmessagefile,"w")
+ fd, commitmessagefile = tempfile.mkstemp(".repoman.msg")
+ mymsg = os.fdopen(fd, "w")
mymsg.write(commitmessage)
if signed:
mymsg.write("\n (Signed Manifest commit)")