summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Wagner <david.wagner@intel.com>2015-02-27 10:03:17 +0100
committerEric Laurent <elaurent@google.com>2015-04-24 13:32:48 -0700
commit0e0503f06659dea8243da85c994ded98686b045d (patch)
treee8e7f986bafe70c98681e4b7c0d0cc0465c5f08b
parentc2f3bb23290a99999d8309cc608fa4e7c085be6d (diff)
downloadexternal_parameter-framework-0e0503f06659dea8243da85c994ded98686b045d.zip
external_parameter-framework-0e0503f06659dea8243da85c994ded98686b045d.tar.gz
external_parameter-framework-0e0503f06659dea8243da85c994ded98686b045d.tar.bz2
domainGenerator.py: more flexible arguments
Allow optional arguments (initial settings, single domains, EDDs) to be passed with an empty list of files. This will make it a lot easier to write helper scripts. Change-Id: I99527376b25d607616a3e73f6b62d556b79a90d2 Signed-off-by: David Wagner <david.wagner@intel.com>
-rwxr-xr-xtools/xmlGenerator/domainGenerator.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/xmlGenerator/domainGenerator.py b/tools/xmlGenerator/domainGenerator.py
index 88c4b02..3e840f0 100755
--- a/tools/xmlGenerator/domainGenerator.py
+++ b/tools/xmlGenerator/domainGenerator.py
@@ -136,19 +136,20 @@ if __name__ == "__main__":
argparser.add_argument('--initial-settings',
help="Initial XML settings file (containing a \
<ConfigurableDomains> tag",
+ nargs='?',
metavar="XML_SETTINGS_FILE")
argparser.add_argument('--add-domains',
help="List of single domain files (each containing a single \
<ConfigurableDomain> tag",
metavar="XML_DOMAIN_FILE",
- nargs='+',
+ nargs='*',
dest='xml_domain_files',
default=[])
argparser.add_argument('--add-edds',
help="List of files in EDD syntax (aka \".pfw\" files)",
metavar="EDD_FILE",
type=argparse.FileType('r'),
- nargs='+',
+ nargs='*',
default=[],
dest='edd_files')
argparser.add_argument('--schemas-dir',