[Buildbot-commits] buildbot/buildbot/changes changes.py,1.26,1.27

Brian Warner warner at users.sourceforge.net
Sat Nov 5 22:53:01 UTC 2005


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

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

use binary mode when opening pickle files, for windows

	* buildbot/changes/changes.py (ChangeMaster.saveYourself): use
	binary mode when opening pickle files, to make windows work
	better. Thanks to Dobes Vandermeer for the catch.
	* buildbot/status/builder.py (BuildStatus.saveYourself): same
	(BuilderStatus.getBuildByNumber): same
	(Status.builderAdded): same
	* buildbot/master.py (BuildMaster.loadChanges): same

	* buildbot/util.py (Swappable): delete unused leftover code


Index: changes.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/changes/changes.py,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- changes.py	19 Jul 2005 23:12:01 -0000	1.26
+++ changes.py	5 Nov 2005 22:52:59 -0000	1.27
@@ -250,7 +250,7 @@
         filename = os.path.join(self.basedir, "changes.pck")
         tmpfilename = filename + ".tmp"
         try:
-            pickle.dump(self, open(tmpfilename, "w"))
+            pickle.dump(self, open(tmpfilename, "wb"))
             if sys.platform == 'win32':
                 # windows cannot rename a file on top of an existing one
                 if os.path.exists(filename):





More information about the Commits mailing list