diff --git a/jennifer b/jennifer index 2bcaf3418e034689cf893c03606e59c54734a60f..6c1aa2c577a4c8da30e918cdda654a7bd58f5112 100755 --- a/jennifer +++ b/jennifer @@ -2,7 +2,7 @@ # Checks Debian packages from Incoming # Copyright (C) 2000, 2001 James Troup -# $Id: jennifer,v 1.6 2002-02-22 01:20:12 troup Exp $ +# $Id: jennifer,v 1.7 2002-02-22 02:19:26 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 @@ -44,7 +44,7 @@ re_is_changes = re.compile (r"(.+?)_(.+?)_(.+?)\.changes$"); ################################################################################ # Globals -jennifer_version = "$Revision: 1.6 $"; +jennifer_version = "$Revision: 1.7 $"; Cnf = None; Options = None; @@ -942,12 +942,11 @@ def action (): answer = 'A'; while string.find(prompt, answer) == -1: - print prompt,; - answer = utils.our_raw_input() - m = katie.re_default_answer.match(prompt) + answer = utils.our_raw_input(prompt); + m = katie.re_default_answer.match(prompt); if answer == "": - answer = m.group(1) - answer = string.upper(answer[:1]) + answer = m.group(1); + answer = string.upper(answer[:1]); if answer == 'R': os.chdir (pkg.directory); diff --git a/katie b/katie index 69c864859bd02d6f0da41add198ce761ac9de97d..6f6771b686750406b1377c557532cbd927a3a869 100755 --- a/katie +++ b/katie @@ -2,7 +2,7 @@ # Installs Debian packages # Copyright (C) 2000, 2001 James Troup -# $Id: katie,v 1.70 2002-02-13 02:38:53 troup Exp $ +# $Id: katie,v 1.71 2002-02-22 02:19:26 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 @@ -39,7 +39,7 @@ import db_access, katie, logging, utils; ############################################################################### # Globals -katie_version = "$Revision: 1.70 $"; +katie_version = "$Revision: 1.71 $"; Cnf = None; Options = None; @@ -196,12 +196,11 @@ def action (): answer = 'I'; while string.find(prompt, answer) == -1: - print prompt,; - answer = utils.our_raw_input() - m = katie.re_default_answer.match(prompt) + answer = utils.our_raw_input(prompt); + m = katie.re_default_answer.match(prompt); if answer == "": - answer = m.group(1) - answer = string.upper(answer[:1]) + answer = m.group(1); + answer = string.upper(answer[:1]); if answer == 'R': do_reject (); diff --git a/melanie b/melanie index 893b8ae75660eb07e854270986bc13a9cbe064f3..479b91e1c6bb3f445820337cb8e1631ad522c5fc 100755 --- a/melanie +++ b/melanie @@ -2,7 +2,7 @@ # General purpose package removal tool for ftpmaster # Copyright (C) 2000, 2001 James Troup -# $Id: melanie,v 1.22 2002-02-12 22:14:38 troup Exp $ +# $Id: melanie,v 1.23 2002-02-22 02:19:26 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 @@ -82,8 +82,7 @@ ARCH, BUG#, COMPONENT and SUITE can be space seperated lists, e.g. # going to do now?" def game_over(): - print "Continue (y/N)? ", - answer = string.lower(utils.our_raw_input()); + answer = string.lower(utils.our_raw_input("Continue (y/N)? ")); if answer != "y": print "Aborted." sys.exit(1); @@ -395,7 +394,7 @@ def main (): Subst["__BCC__"] = "Bcc: " + string.join(bcc, ", "); else: Subst["__BCC__"] = "X-Filler: 42"; - Subst["__CC__"] = "X-Melanie: $Revision: 1.22 $"; + Subst["__CC__"] = "X-Melanie: $Revision: 1.23 $"; if carbon_copy: Subst["__CC__"] = Subst["__CC__"] + "\nCc: " + string.join(carbon_copy, ", "); Subst["__SUITE_LIST__"] = suites_list; diff --git a/utils.py b/utils.py index 97df03c06d818f32a878a187dfd8e8f1c3a2cb7e..cc9672352b6eed91c07eb9851770d4c4b8e4088e 100644 --- a/utils.py +++ b/utils.py @@ -1,6 +1,6 @@ # Utility functions # Copyright (C) 2000, 2001 James Troup -# $Id: utils.py,v 1.38 2002-02-12 23:15:23 troup Exp $ +# $Id: utils.py,v 1.39 2002-02-22 02:19:26 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 @@ -63,15 +63,16 @@ def touch_file(filename): ###################################################################################### -# From reportbug -def our_raw_input(): - sys.stdout.flush() +def our_raw_input(prompt=""): + if prompt: + sys.stdout.write(prompt); + sys.stdout.flush(); try: - ret = raw_input() + ret = raw_input(); return ret except EOFError: - sys.stderr.write('\nUser interrupt (^D).\n') - raise SystemExit + sys.stderr.write('\nUser interrupt (^D).\n'); + raise SystemExit; ######################################################################################