]> err.no Git - dak/commitdiff
fdopen
authorJoerg Jaspert <joerg@debian.org>
Sat, 24 Jan 2009 15:43:44 +0000 (16:43 +0100)
committerJoerg Jaspert <joerg@debian.org>
Sat, 24 Jan 2009 15:43:44 +0000 (16:43 +0100)
who would have thought, os.fdopen really wants an fd, not a filename.

Signed-off-by: Joerg Jaspert <joerg@debian.org>
dak/process_new.py
daklib/queue.py

index d742ac20c3a1c1a0ca9b91871acbf00cda941cb2..496e5689babf47ba026018b6437a1bb765ccb4a5 100755 (executable)
@@ -458,7 +458,7 @@ def edit_overrides (new):
 def edit_note(note):
     # Write the current data to a temporary file
     (fd, temp_filename) = utils.temp_filename()
-    temp_file = os.fdopen(temp_filename, 'w')
+    temp_file = os.fdopen(fd, 'w')
     temp_file.write(note)
     temp_file.close()
     editor = os.environ.get("EDITOR","vi")
index 3ac52b344f14575b1a396a7634589b398f003939..1a4bb3b345a368c0f2040f46263ca046382a23f5 100755 (executable)
@@ -501,7 +501,7 @@ distribution."""
                dsc.has_key("bts changelog"):
 
                 (fd, temp_filename) = utils.temp_filename(Cnf["Dir::Queue::BTSVersionTrack"], prefix=".")
-                version_history = os.fdopen(temp_filename, 'w')
+                version_history = os.fdopen(fd, 'w')
                 version_history.write(dsc["bts changelog"])
                 version_history.close()
                 filename = "%s/%s" % (Cnf["Dir::Queue::BTSVersionTrack"],
@@ -511,7 +511,7 @@ distribution."""
 
             # Write out the binary -> source mapping.
             (fd, temp_filename) = utils.temp_filename(Cnf["Dir::Queue::BTSVersionTrack"], prefix=".")
-            debinfo = os.fdopen(temp_filename, 'w')
+            debinfo = os.fdopen(fd, 'w')
             for file_entry in file_keys:
                 f = files[file_entry]
                 if f["type"] == "deb":