From: James Troup Date: Fri, 10 May 2002 00:24:23 +0000 (+0000) Subject: use validate_changes_file_arg X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=d3027250f15cf50fbb103c087871458b560feae1;p=dak.git use validate_changes_file_arg --- diff --git a/ashley b/ashley index 12b860a6..f29d67d1 100755 --- a/ashley +++ b/ashley @@ -2,7 +2,7 @@ # Dump variables from a .katie file to stdout # Copyright (C) 2001, 2002 James Troup -# $Id: ashley,v 1.4 2002-05-08 11:08:45 troup Exp $ +# $Id: ashley,v 1.5 2002-05-10 00:24:23 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 @@ -25,11 +25,7 @@ def main(): Cnf = utils.get_conf() k = katie.Katie(Cnf); for arg in sys.argv[1:]: - if arg[-6:] == ".katie": - arg = arg[:-6]+".changes"; - if arg[-8:] != ".changes": - utils.warn("Skipping '%s', unknown file type." % (arg)); - continue; + arg = utils.validate_changes_file_arg(arg); k.pkg.changes_file = arg; print "%s:" % (arg); k.init_vars(); diff --git a/lisa b/lisa index 04491286..724360a8 100755 --- a/lisa +++ b/lisa @@ -2,7 +2,7 @@ # Handles NEW and BYHAND packages # Copyright (C) 2001, 2002 James Troup -# $Id: lisa,v 1.9 2002-05-08 11:13:02 troup Exp $ +# $Id: lisa,v 1.10 2002-05-10 00:24:23 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 @@ -58,7 +58,7 @@ import apt_pkg, apt_inst; import db_access, fernanda, katie, logging, utils; # Globals -lisa_version = "$Revision: 1.9 $"; +lisa_version = "$Revision: 1.10 $"; Cnf = None; Options = None; @@ -760,8 +760,8 @@ def main(): Katie.Subst["__BCC__"] = bcc; for changes_file in changes_files: - if not os.path.exists(changes_file): - print "\nSkipping %s - file does not exist." % (changes_file); + changes_file = utils.validate_changes_file_arg(changes_file, 0); + if not changes_file: continue; print "\n" + changes_file; do_pkg (changes_file);