[Zodb-checkins] SVN: zdaemon/branches/py3/src/zdaemon/tests/testzdrun.py Explicitly close files.
Marius Gedminas
cvs-admin at zope.org
Thu Feb 14 11:15:43 UTC 2013
Log message for revision 129394:
Explicitly close files.
Changed:
U zdaemon/branches/py3/src/zdaemon/tests/testzdrun.py
-=-
Modified: zdaemon/branches/py3/src/zdaemon/tests/testzdrun.py
===================================================================
--- zdaemon/branches/py3/src/zdaemon/tests/testzdrun.py 2013-02-14 11:15:39 UTC (rev 129393)
+++ zdaemon/branches/py3/src/zdaemon/tests/testzdrun.py 2013-02-14 11:15:42 UTC (rev 129394)
@@ -384,7 +384,8 @@
def writeConfig(self, config):
config_file = os.path.join(self.root, 'config')
- open(config_file, 'w').write(config)
+ with open(config_file, 'w') as f:
+ f.write(config)
return config_file
def testDirectoryChown(self):
More information about the Zodb-checkins
mailing list