#!/usr/bin/env python
# Handles NEW and BYHAND packages
-# Copyright (C) 2001, 2002 James Troup <james@nocrew.org>
-# $Id: lisa,v 1.18 2002-10-16 02:47:32 troup Exp $
+# Copyright (C) 2001, 2002, 2003 James Troup <james@nocrew.org>
+# $Id: lisa,v 1.21 2003-02-11 19:39:28 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
import db_access, fernanda, katie, logging, utils;
# Globals
-lisa_version = "$Revision: 1.18 $";
+lisa_version = "$Revision: 1.21 $";
Cnf = None;
Options = None;
got_answer = 0
while not got_answer:
answer = utils.our_raw_input(prompt);
- answer = answer[:1].upper();
+ if not utils.str_isnum(answer):
+ answer = answer[:1].upper();
if answer == "E" or answer == "D":
got_answer = 1;
elif katie.re_isanum.match (answer):
answer = int(answer);
if (answer < 1) or (answer > index):
- print "%s is not a valid index (%s). Please retry." % (index_range(index), answer);
+ print "%s is not a valid index (%s). Please retry." % (answer, index_range(index));
else:
got_answer = 1;
def check_pkg ():
try:
- less_fd = os.popen("less -", 'w', 0);
+ less_fd = os.popen("less -R -", 'w', 0);
stdout_fd = sys.stdout;
try:
sys.stdout = less_fd;
# Kill me now? **FIXME**
Cnf["Dinstall::Options::No-Mail"] = "";
- bcc = "X-Katie: %s" % (lisa_version);
+ bcc = "X-Katie: lisa %s" % (lisa_version);
if Cnf.has_key("Dinstall::Bcc"):
Katie.Subst["__BCC__"] = bcc + "\nBcc: %s" % (Cnf["Dinstall::Bcc"]);
else: