From abb084c52c7ef53b50e44a2c812b4588f20379ad Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt Date: Thu, 10 May 2012 10:22:40 +0200 Subject: [PATCH] Make dominate -s work without Obsolete::Options::Suite set. --- dak/dominate.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dak/dominate.py b/dak/dominate.py index 5c919ab8..be8c5220 100755 --- a/dak/dominate.py +++ b/dak/dominate.py @@ -125,10 +125,6 @@ def main(): ('s', "suite", "Obsolete::Options::Suite", "HasArg"), ('n', "no-action", "Obsolete::Options::No-Action"), ('f', "force", "Obsolete::Options::Force")] - query_suites = DBConn().session().query(Suite) - suites = [suite.suite_name for suite in query_suites.all()] - if not cnf.has_key('Obsolete::Options::Suite'): - cnf['Obsolete::Options::Suite'] = ','.join(suites) cnf['Obsolete::Options::Help'] = '' cnf['Obsolete::Options::No-Action'] = '' cnf['Obsolete::Options::Force'] = '' @@ -136,6 +132,10 @@ def main(): Options = cnf.subtree("Obsolete::Options") if Options['Help']: usage() + if 'Suite' not in Options: + query_suites = DBConn().session().query(Suite) + suites = [suite.suite_name for suite in query_suites.all()] + cnf['Obsolete::Options::Suite'] = ','.join(suites) Logger = daklog.Logger("dominate") session = DBConn().session() for suite_name in utils.split_args(Options['Suite']): -- 2.39.5