[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master] And do the cmd parsing before we set log stuff



Signed-off-by: Joerg Jaspert <joerg@debian.org>
---
 dak/contents.py |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/dak/contents.py b/dak/contents.py
index c0713c7..1efb361 100755
--- a/dak/contents.py
+++ b/dak/contents.py
@@ -377,6 +377,14 @@ def main():
                 'cruft' : Contents.cruft,
                 }
 
+    args = apt_pkg.ParseCommandLine(cnf.Cnf, arguments,sys.argv)
+
+    if (len(args) < 1) or not commands.has_key(args[0]):
+        usage()
+
+    if cnf.has_key("%s::%s" % (options_prefix,"Help")):
+        usage()
+
     level=logging.INFO
     if cnf.has_key("%s::%s" % (options_prefix,"Quiet")):
         level=logging.ERROR
@@ -389,14 +397,6 @@ def main():
                          format='%(asctime)s %(levelname)s %(message)s',
                          stream = sys.stderr )
 
-    args = apt_pkg.ParseCommandLine(cnf.Cnf, arguments,sys.argv)
-
-    if (len(args) < 1) or not commands.has_key(args[0]):
-        usage()
-
-    if cnf.has_key("%s::%s" % (options_prefix,"Help")):
-        usage()
-
     commands[args[0]](Contents())
 
 if __name__ == '__main__':
-- 
1.5.6.5


Reply to: