[Buildbot-commits] buildbot/buildbot/steps transfer.py,1.7,1.8

Brian Warner warner at users.sourceforge.net
Sat Mar 24 18:40:25 UTC 2007


Update of /cvsroot/buildbot/buildbot/buildbot/steps
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15510/buildbot/steps

Modified Files:
	transfer.py 
Log Message:
[project @ filetransfer: open files in 'b' mode to avoid text-conversion problems. Thanks to Phil Thompson for the patch. Fixes SF#1674927.]

Original author: warner at lothar.com
Date: 2007-03-24 18:34:35

Index: transfer.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/steps/transfer.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- transfer.py	9 Dec 2006 19:25:56 -0000	1.7
+++ transfer.py	24 Mar 2007 18:40:23 -0000	1.8
@@ -16,7 +16,7 @@
 
     def __init__(self, destfile, maxsize, mode):
         self.destfile = destfile
-        self.fp = open(destfile, "w")
+        self.fp = open(destfile, "wb")
         if mode is not None:
             os.chmod(destfile, mode)
 	self.remaining = maxsize
@@ -240,7 +240,7 @@
 
         # setup structures for reading the file
         try:
-            fp = open(source, 'r')
+            fp = open(source, 'rb')
         except IOError:
             # if file does not exist, bail out with an error
             self.addCompleteLog('stderr',





More information about the Commits mailing list