# HG changeset patch # User Bernhard Herzog # Date 1173892972 -3600 # Node ID 206d63ee310e55a4b7820dd148fa880e08d5c4aa # Parent 06fba656dde869d55ad10ae8f4f96ad2984aa606 cope with unknown packager names in runtreepkg.py diff -r 06fba656dde8 -r 206d63ee310e runtreepkg.py --- 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()