[Buildbot-commits] buildbot/buildbot/status builder.py,1.59,1.60

Brian Warner warner at users.sourceforge.net
Tue Jul 19 19:49:39 UTC 2005


Update of /cvsroot/buildbot/buildbot/buildbot/status
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31532/buildbot/status

Modified Files:
	builder.py 
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-237
Creator:  Brian Warner <warner at lothar.com>

don't use open(mode="wt+") to fix OS-X problem, other small fixes

	* docs/buildbot.texinfo (@settitle): don't claim version 1.0

	* buildbot/changes/mail.py (parseSyncmail): update comment

	* buildbot/test/test_slavecommand.py: disable Shell tests on
	platforms that don't suport IReactorProcess

	* buildbot/status/builder.py (LogFile): remove the 't' mode from
	all places where we open logfiles. It causes OS-X to open the file
	in some weird mode that that prevents us from mixing reads and
	writes to the same filehandle, which we depend upon to implement
	_generateChunks properly. This change doesn't appear to break
	win32, on which "b" and "t" are treated differently but a missing
	flag seems to be interpreted as "t".


Index: builder.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/builder.py,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- builder.py	23 May 2005 17:45:56 -0000	1.59
+++ builder.py	19 Jul 2005 19:49:36 -0000	1.60
@@ -216,7 +216,7 @@
         self.name = name
         self.filename = logfilename
         assert not os.path.exists(self.getFilename())
-        self.openfile = open(self.getFilename(), "wt+")
+        self.openfile = open(self.getFilename(), "w+")
         self.runEntries = []
         self.watchers = []
         self.finishedWatchers = []
@@ -249,7 +249,7 @@
             # don't close it!
             return self.openfile
         # otherwise they get their own read-only handle
-        return open(self.getFilename(), "rt")
+        return open(self.getFilename(), "r")
 
     def getText(self):
         # this produces one ginormous string
@@ -427,7 +427,7 @@
         pickled LogFile (inside the pickled Build) won't be modified."""
         self.filename = logfilename
         if not os.path.exists(self.getFilename()):
-            self.openfile = open(self.getFilename(), "wt")
+            self.openfile = open(self.getFilename(), "w")
             self.finished = False
             for channel,text in self.entries:
                 self.addEntry(channel, text)





More information about the Commits mailing list