X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fprocess_new.py;h=496e5689babf47ba026018b6437a1bb765ccb4a5;hb=44eaf60968134772f72e3713e69bec1f8f33bb00;hp=e45dd8b2a47abd2f121abc3172fdca5973c0d721;hpb=365839271f9d74abdd4263d893e784d5b38ce7ab;p=dak.git diff --git a/dak/process_new.py b/dak/process_new.py index e45dd8b2..496e5689 100755 --- a/dak/process_new.py +++ b/dak/process_new.py @@ -230,6 +230,7 @@ def sort_changes(changes_files): class Section_Completer: def __init__ (self): self.sections = [] + self.matches = [] q = projectB.query("SELECT section FROM section") for i in q.getresult(): self.sections.append(i[0]) @@ -251,6 +252,7 @@ class Section_Completer: class Priority_Completer: def __init__ (self): self.priorities = [] + self.matches = [] q = projectB.query("SELECT priority FROM priority") for i in q.getresult(): self.priorities.append(i[0]) @@ -309,8 +311,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 +457,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(fd, 'w') temp_file.write(note) temp_file.close() editor = os.environ.get("EDITOR","vi") @@ -561,12 +563,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:"