X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fprocess_new.py;h=8a43f127370a2d0e584585111d27416d8d11a126;hb=bd78bbf9170cc8ee2dda06a7f060fd3370fea2bd;hp=e45dd8b2a47abd2f121abc3172fdca5973c0d721;hpb=158e9baf0e519d1af426df73b693008abacb3c26;p=dak.git diff --git a/dak/process_new.py b/dak/process_new.py index e45dd8b2..8a43f127 100755 --- a/dak/process_new.py +++ b/dak/process_new.py @@ -309,8 +309,8 @@ def index_range (index): def edit_new (new): # Write the current data to a temporary file - temp_filename = utils.temp_filename() - temp_file = utils.open_file(temp_filename, 'w') + (fd, temp_filename) = utils.temp_filename() + temp_file = os.fdopen(fd, 'w') print_new (new, 0, temp_file) temp_file.close() # Spawn an editor on that file @@ -455,8 +455,8 @@ def edit_overrides (new): def edit_note(note): # Write the current data to a temporary file - temp_filename = utils.temp_filename() - temp_file = utils.open_file(temp_filename, 'w') + (fd, temp_filename) = utils.temp_filename() + temp_file = os.fdopen(temp_filename, 'w') temp_file.write(note) temp_file.close() editor = os.environ.get("EDITOR","vi") @@ -561,12 +561,12 @@ def add_overrides (new): def prod_maintainer (): # Here we prepare an editor and get them ready to prod... - temp_filename = utils.temp_filename() + (fd, temp_filename) = utils.temp_filename() editor = os.environ.get("EDITOR","vi") answer = 'E' while answer == 'E': os.system("%s %s" % (editor, temp_filename)) - f = utils.open_file(temp_filename) + f = os.fdopen(fd) prod_message = "".join(f.readlines()) f.close() print "Prod message:"