Mercurial > treepkg
changeset 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 | 06fba656dde8 |
children | f7f89548a2a6 |
files | runtreepkg.py |
diffstat | 1 files changed, 11 insertions(+), 7 deletions(-) [+] |
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()