pld-builder.new: PLD_Builder/bqueue.py, PLD_Builder/srpm_builder.py fdopen ...

arekm arekm at pld-linux.org
Sat Nov 13 23:55:03 CET 2010


Author: arekm                        Date: Sat Nov 13 22:55:03 2010 GMT
Module: pld-builder.new               Tag: HEAD
---- Log message:
fdopen mode

---- Files affected:
pld-builder.new/PLD_Builder:
   bqueue.py (1.21 -> 1.22) , srpm_builder.py (1.75 -> 1.76) 

---- Diffs:

================================================================
Index: pld-builder.new/PLD_Builder/bqueue.py
diff -u pld-builder.new/PLD_Builder/bqueue.py:1.21 pld-builder.new/PLD_Builder/bqueue.py:1.22
--- pld-builder.new/PLD_Builder/bqueue.py:1.21	Sat Nov 13 23:45:56 2010
+++ pld-builder.new/PLD_Builder/bqueue.py	Sat Nov 13 23:54:58 2010
@@ -23,7 +23,7 @@
 
     def dump(self, fname):
         (fdno, tmpfname) = tempfile.mkstemp(dir=os.path.dirname(fname))
-        f = os.fdopen(fdno)
+        f = os.fdopen(fdno, "w")
         self.requests.reverse()
         for r in self.requests:
             r.dump(f)
@@ -36,7 +36,7 @@
 
     def dump_html(self, fname):
         (fdno, tmpfname) = tempfile.mkstemp(dir=os.path.dirname(fname))
-        f = os.fdopen(fdno)
+        f = os.fdopen(fdno, "w")
         f.write("""
 <html>
     <head>
@@ -123,7 +123,7 @@
         sio.write(gpg.sign(sio.read()))
         sio.seek(0)
         (fdno, tmpname) = tempfile.mkstemp(dir=os.path.dirname(name))
-        f = os.fdopen(fdno)
+        f = os.fdopen(fdno, "w")
         if re.search(r"\.gz$", name):
             fgz = gzip.GzipFile(filename=name, mode="w", compresslevel=6, fileobj=f)
             util.sendfile(sio, fgz)

================================================================
Index: pld-builder.new/PLD_Builder/srpm_builder.py
diff -u pld-builder.new/PLD_Builder/srpm_builder.py:1.75 pld-builder.new/PLD_Builder/srpm_builder.py:1.76
--- pld-builder.new/PLD_Builder/srpm_builder.py:1.75	Sat Nov 13 23:45:56 2010
+++ pld-builder.new/PLD_Builder/srpm_builder.py	Sat Nov 13 23:54:58 2010
@@ -65,7 +65,7 @@
     q.unlock()
 
     (fdno, tmpfname) = tempfile.mkstemp(dir=os.path.dirname(path.max_req_no_file))
-    cnt_f = os.fdopen(fdno)
+    cnt_f = os.fdopen(fdno, "w")
     cnt_f.seek(0)
     cnt_f.write("%d\n" % num)
     cnt_f.flush()
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pld-builder.new/PLD_Builder/bqueue.py?r1=1.21&r2=1.22&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pld-builder.new/PLD_Builder/srpm_builder.py?r1=1.75&r2=1.76&f=u



More information about the pld-cvs-commit mailing list