]> err.no Git - dak/commitdiff
Check for help option before we do any database connect or sudo checks/prints
authorJoerg Jaspert <joerg@debian.org>
Fri, 21 Mar 2008 20:49:03 +0000 (21:49 +0100)
committerJoerg Jaspert <joerg@debian.org>
Fri, 21 Mar 2008 20:49:03 +0000 (21:49 +0100)
dak/transitions.py

index 3cac07af25142477214ff8d9c9db159f4455be3d..23752718d15ab5a1bfd589fc48bd15b0f9b3605e 100755 (executable)
@@ -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):