X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=heidi;h=2454b23478c54c81c8556acf16d1a825aba2e065;hb=4d40ad73b577700f97128cdea5e2e177baf38e6a;hp=4ad52cfb6d3a75370158ec38bfecd9415e385416;hpb=ec44b1937e42da2e89e0c2e5c027fc963e81a4ea;p=dak.git diff --git a/heidi b/heidi index 4ad52cfb..2454b234 100755 --- a/heidi +++ b/heidi @@ -1,8 +1,8 @@ #!/usr/bin/env python # Manipulate suite tags -# Copyright (C) 2000, 2001, 2002, 2003 James Troup -# $Id: heidi,v 1.17 2003-04-15 16:03:31 troup Exp $ +# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 James Troup +# $Id: heidi,v 1.19 2005-11-15 09:50:32 ajt 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 @@ -176,7 +176,7 @@ def process_file (file, suite, action): assoication_id = ql[0][0]; # Take action if action == "add": - if assoication_id != None: + if assoication_id: utils.warn("'%s~%s~%s' already exists in suite %s." % (package, version, architecture, suite)); continue; else: @@ -197,7 +197,7 @@ def process_file (file, suite, action): assoication_id = ql[0][0]; # Take action if action == "add": - if assoication_id != None: + if assoication_id: utils.warn("'%s~%s~%s' already exists in suite %s." % (package, version, architecture, suite)); continue; else: @@ -259,10 +259,10 @@ def main (): for i in ("add", "list", "remove", "set"): if Cnf["Heidi::Options::%s" % (i)] != "": suite = Cnf["Heidi::Options::%s" % (i)]; - if not Cnf.has_key("Suite::%s" % (suite)): + if db_access.get_suite_id(suite) == -1: utils.fubar("Unknown suite '%s'." %(suite)); else: - if action != None: + if action: utils.fubar("Can only perform one action at a time."); action = i;