From: Joerg Jaspert Date: Sat, 24 Jan 2009 15:43:44 +0000 (+0100) Subject: fdopen X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44eaf60968134772f72e3713e69bec1f8f33bb00;p=dak fdopen who would have thought, os.fdopen really wants an fd, not a filename. Signed-off-by: Joerg Jaspert --- diff --git a/dak/process_new.py b/dak/process_new.py index d742ac20..496e5689 100755 --- a/dak/process_new.py +++ b/dak/process_new.py @@ -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") diff --git a/daklib/queue.py b/daklib/queue.py index 3ac52b34..1a4bb3b3 100755 --- a/daklib/queue.py +++ b/daklib/queue.py @@ -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":