diff runtreepkg.py @ 27:206d63ee310e

cope with unknown packager names in runtreepkg.py
author Bernhard Herzog <bh@intevation.de>
date Wed, 14 Mar 2007 18:22:52 +0100
parents 2bfb84bc4350
children 78cf5f6778ec
line wrap: on
line diff
--- a/runtreepkg.py	Wed Mar 14 17:48:23 2007 +0100
+++ b/runtreepkg.py	Wed Mar 14 18:22:52 2007 +0100
@@ -8,6 +8,7 @@
 
 """Starts the tree packager"""
 
+import sys
 import os
 import logging
 from optparse import OptionParser
@@ -43,6 +44,7 @@
     initialize_logging()
 
     treepkg_opts, packager_opts = read_config(options.config_file)
+
     if args:
         packager_opts = [opts for opts in packager_opts if opts["name"] in args]
         # check whether we got all of the names in args:
@@ -52,12 +54,14 @@
                 args.remove(name)
         for name in args:
             print >>sys.stderr, "No package lines found named %r" % name
-    group = PackagerGroup([create_package_line(**opts)
-                           for opts in packager_opts],
-                          **treepkg_opts)
-    if options.once:
-        group.check_package_lines()
-    else:
-        group.run()
+
+    if packager_opts:
+        group = PackagerGroup([create_package_line(**opts)
+                               for opts in packager_opts],
+                              **treepkg_opts)
+        if options.once:
+            group.check_package_lines()
+        else:
+            group.run()
 
 main()
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)