X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=heidi;h=e708cbdf81f0629c01e4bf24554437ade0eb6776;hb=381930bcfa8b8c398b4f0dcf825c72f8fc3d1462;hp=476cc2137c79bbe021d5876654b62fea717d0982;hpb=e00214ecab52484cd8673b43551b4584efa2a989;p=dak.git diff --git a/heidi b/heidi index 476cc213..e708cbdf 100755 --- a/heidi +++ b/heidi @@ -1,8 +1,8 @@ #!/usr/bin/env python # Manipulate suite tags -# Copyright (C) 2000, 2001 James Troup -# $Id: heidi,v 1.10 2001-11-04 22:40:12 troup Exp $ +# Copyright (C) 2000, 2001, 2002 James Troup +# $Id: heidi,v 1.14 2002-05-14 15:29:18 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 @@ -42,7 +42,7 @@ ####################################################################################### -import os, pg, string, sys; +import pg, string, sys; import apt_pkg; import utils, db_access, logging; @@ -232,10 +232,7 @@ def get_list (suite): def main (): global Cnf, projectB, Logger; - apt_pkg.init(); - - Cnf = apt_pkg.newConfiguration(); - apt_pkg.ReadConfigFileISC(Cnf,utils.which_conf_file()); + Cnf = utils.get_conf() Arguments = [('a',"add","Heidi::Options::Add", "HasArg"), ('h',"help","Heidi::Options::Help"), @@ -244,7 +241,8 @@ def main (): ('s',"set", "Heidi::Options::Set", "HasArg")]; for i in ["add", "help", "list", "remove", "set", "version" ]: - Cnf["Heidi::Options::%s" % (i)] = ""; + if not Cnf.has_key("Heidi::Options::%s" % (i)): + Cnf["Heidi::Options::%s" % (i)] = ""; file_list = apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv); Options = Cnf.SubTree("Heidi::Options") @@ -280,7 +278,7 @@ def main (): get_list(suite); else: Logger = logging.Logger(Cnf, "heidi"); - if file_list != []: + if file_list: for file in file_list: process_file(utils.open_file(file), suite, action); else: