]> git.pld-linux.org Git - projects/pld-builder.new.git/commitdiff
fdopen mode
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Sat, 13 Nov 2010 22:54:58 +0000 (22:54 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    PLD_Builder/bqueue.py -> 1.22
    PLD_Builder/srpm_builder.py -> 1.76

PLD_Builder/bqueue.py
PLD_Builder/srpm_builder.py

index 253b3a641043d8d829a7dd4c8e125ecbbc824f39..ac98a734815e0559f187dee365635404d832934d 100644 (file)
@@ -23,7 +23,7 @@ class B_Queue:
 
     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 @@ class B_Queue:
 
     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 @@ class B_Queue:
         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 d1cee943e1a2dcfaad650c3461ea3fcaacb31912..50bf8400c19e58cb1bc41a47096948a7aa07d8ca 100644 (file)
@@ -65,7 +65,7 @@ def store_binary_request(r):
     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()
This page took 0.124821 seconds and 4 git commands to generate.