[Zope-CVS] CVS: CVSROOT - postcommit_actions:1.134

Ken Manheimer klm@zope.com
Tue, 4 Dec 2001 11:16:07 -0500


Update of /cvs-repository/CVSROOT
In directory cvs.zope.org:/tmp/cvs-serv12420

Modified Files:
	postcommit_actions 
Log Message:
Jens pointed out that use of tempfile.template is being deprecated in
python2, and suggests using this approach instead of the template.
(I've copied the file to the repository before this commit, so this
commit should exercise the change...)


=== CVSROOT/postcommit_actions 1.133 => 1.134 ===
     tempfile.mktemp()           # Throw one away, to get initial template.
     tempfile.tempdir = "/tmp"
-    template = (tempfile.template or
-                "@%s.%d" % (os.getpid(), whrandom.randint(1000000, 9999999)))
-    tempfile.template = "cvs-log" + template
-    msgfile = open(tempfile.mktemp(), 'w')
+##    template = (tempfile.template or
+##                "@%s.%d" % (os.getpid(), whrandom.randint(1000000, 9999999)))
+##    tempfile.template = "cvs-log" + template
+    msgfile = open(tempfile.mktemp(suffix='.cvslog'), 'w')
     msgfile.write(sys.stdin.read())
     msgfile.close()
     msgfilenm = msgfile.name