From deb5f3b36f681b5e5e9dafe68bdad3a0a8390fb9 Mon Sep 17 00:00:00 2001 From: Joerg Jaspert Date: Fri, 21 Mar 2008 21:49:03 +0100 Subject: [PATCH] Check for help option before we do any database connect or sudo checks/prints --- dak/transitions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dak/transitions.py b/dak/transitions.py index 3cac07af..23752718 100755 --- a/dak/transitions.py +++ b/dak/transitions.py @@ -58,6 +58,9 @@ def init(): Options = Cnf.SubTree("Edit-Transitions::Options") + if Options["help"]: + usage() + whoami = os.getuid() whoamifull = pwd.getpwuid(whoami) username = whoamifull[0] @@ -68,9 +71,6 @@ def init(): projectB = pg.connect(Cnf["DB::Name"], Cnf["DB::Host"], int(Cnf["DB::Port"])) daklib.database.init(Cnf, projectB) - if Options["help"]: - usage() - ################################################################################ def usage (exit_code=0): -- 2.39.5