X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=katie.py;h=fd44215acc83b27da74c99019e0a2c52e21f086c;hb=3e4d6edf1d0e697cae141be043054d1109364fec;hp=a46b729abc1ce234934b8bc0ba233e7b8953dee0;hpb=2e3d931ac7dbf2b90b4571cbd594aeed07f0bd8a;p=dak.git diff --git a/katie.py b/katie.py index a46b729a..fd44215a 100644 --- a/katie.py +++ b/katie.py @@ -1,8 +1,8 @@ #!/usr/bin/env python # Utility functions for katie -# Copyright (C) 2001, 2002 James Troup -# $Id: katie.py,v 1.28 2003-01-20 19:13:23 troup Exp $ +# Copyright (C) 2001, 2002, 2003 James Troup +# $Id: katie.py,v 1.30 2003-02-21 19:19:07 troup Exp $ # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -475,10 +475,11 @@ distribution."""; ########################################################################### - def force_move (self, files): - """Forcefully move files from the current directory to the reject - directory. If any file already exists it will be moved to the - morgue to make way for the new file.""" + def force_reject (self, files): + """Forcefully move files from the current directory to the + reject directory. If any file already exists in the reject + directory it will be moved to the morgue to make way for + the new file.""" Cnf = self.Cnf @@ -527,10 +528,10 @@ distribution."""; while answer == 'E': os.system("%s %s" % (editor, temp_filename)) file = utils.open_file(temp_filename); - reject_message = " ".join(file.readlines()); + reject_message = "".join(file.readlines()); file.close(); print "Reject message:"; - print utils.prefix_multi_line_string(reject_message," "); + print utils.prefix_multi_line_string(reject_message," ",include_blank_lines=1); prompt = "[R]eject, Edit, Abandon, Quit ?" answer = "XXX"; while prompt.find(answer) == -1: @@ -556,7 +557,7 @@ distribution."""; # Move all the files into the reject directory reject_files = pkg.files.keys() + [pkg.changes_file]; - self.force_move(reject_files); + self.force_reject(reject_files); # If we fail here someone is probably trying to exploit the race # so let's just raise an exception ...