X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=shania;h=069df37d076829f35985650efe1d2e97d91b00f8;hb=fc1e81cf87861694e19b96afa8dd849dd967343c;hp=51febbb50a5612fad135976f10883b102b952832;hpb=87f1f5167cff0dbc3995f2a44366ac89fe30f679;p=dak.git diff --git a/shania b/shania index 51febbb5..069df37d 100755 --- a/shania +++ b/shania @@ -2,7 +2,7 @@ # Clean incoming of old unused files # Copyright (C) 2000, 2001 James Troup -# $Id: shania,v 1.8 2001-11-16 21:35:56 rmurray Exp $ +# $Id: shania,v 1.10 2001-11-19 20:42:40 rmurray 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 @@ -131,7 +131,7 @@ def flush_orphans (): changes = utils.parse_changes(changes_filename, 0) files = utils.build_file_list(changes, ""); except: - utils.warn("error processing '%s'; skipping it. [Got %s]" % (file, sys.exc_type)); + utils.warn("error processing '%s'; skipping it. [Got %s]" % (changes_filename, sys.exc_type)); continue; dsc_files = {}; @@ -173,15 +173,13 @@ def flush_orphans (): def main (): global Cnf, Options; - apt_pkg.init(); - - Cnf = apt_pkg.newConfiguration(); + Cnf = utils.get_conf() for i in ["Help", "Incoming", "No-Action", "Verbose" ]: - Cnf["Shania::Options::%s" % (i)] = ""; - Cnf["Shania::Options::Days"] = "14"; - - apt_pkg.ReadConfigFileISC(Cnf,utils.which_conf_file()); + if not Cnf.has_key("Shania::Options::%s" % (i)): + Cnf["Shania::Options::%s" % (i)] = ""; + if not Cnf.has_key("Shania::Options::Days"): + Cnf["Shania::Options::Days"] = "14"; Arguments = [('h',"help","Shania::Options::Help"), ('d',"days","Shania::Options::Days", "IntVal"),