From a2223d49c8d5e27951b702a5b8a59a278f03fb74 Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Tue, 12 Mar 2013 17:21:50 +0000 Subject: update.py: support one-module-per-line configuration Fixes bug #1122701 Allow: module=foo module=bar rather than modules=foo,bar to make reviewing changes easier. Change-Id: Ic0a7fb28fd34f530c93806a5fb79ed3dc3bc494e --- update.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'update.py') diff --git a/update.py b/update.py index cc50c40..8d2882e 100644 --- a/update.py +++ b/update.py @@ -68,7 +68,11 @@ from oslo.config import cfg opts = [ cfg.ListOpt('modules', default=[], - help='The list of modules to copy from openstack-common'), + help='The list of modules to copy from oslo-incubator ' + '(deprecated in favor of --module)'), + cfg.MultiStrOpt('module', + default=[], + help='The list of modules to copy from oslo-incubator'), cfg.StrOpt('base', default=None, help='The base module to hold the copy of openstack.common'), @@ -229,7 +233,7 @@ def main(argv): print >> sys.stderr, "A valid destination dir is required" sys.exit(1) - if not conf.modules: + if not conf.module and not conf.modules: print >> sys.stderr, "A list of modules to copy is required" sys.exit(1) @@ -240,7 +244,7 @@ def main(argv): _create_module_init(conf.base, dest_dir) _create_module_init(conf.base, dest_dir, 'common') - for mod in conf.modules: + for mod in conf.module + conf.modules: _copy_module(mod, conf.base, dest_dir) -- cgit