[Checkins] SVN: plone.z3cform/trunk/plone/z3cform/base.txt - using the file descriptor makes sure we close the file opened by mkstemp

Yvo Schubbe y.2008 at wcm-solutions.de
Mon Jul 21 04:37:04 EDT 2008


Log message for revision 88646:
  - using the file descriptor makes sure we close the file opened by mkstemp

Changed:
  U   plone.z3cform/trunk/plone/z3cform/base.txt

-=-
Modified: plone.z3cform/trunk/plone/z3cform/base.txt
===================================================================
--- plone.z3cform/trunk/plone/z3cform/base.txt	2008-07-21 06:19:19 UTC (rev 88645)
+++ plone.z3cform/trunk/plone/z3cform/base.txt	2008-07-21 08:37:00 UTC (rev 88646)
@@ -64,8 +64,8 @@
     >>> import os
     >>> import tempfile
     >>> from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
-    >>> handle, path = tempfile.mkstemp()
-    >>> f = open(path, 'w')
+    >>> fd, path = tempfile.mkstemp()
+    >>> f = os.fdopen(fd, 'w')
     >>> f.write("""
     ... <html>Hello, this is your layout speaking:
     ... <div tal:content="structure view/contents"></div>



More information about the Checkins mailing list