Commit 21cf6792 authored by Giorgos Verigakis's avatar Giorgos Verigakis
Browse files

Add a -o option to override the configuration

parent 60560d7c
......@@ -739,6 +739,9 @@ def main():
help='use verbose output')
parser.add_option('-d', dest='debug', action='store_true', default=False,
help='use debug output')
parser.add_option('-o', dest='options', action='append',
metavar='KEY=VAL',
help='override a config value (can be used multiple times)')
# Do a preliminary parsing, ignore any errors since we will print help
# anyway if we don't reach the main parsing.
......@@ -760,6 +763,13 @@ def main():
log.error('%s', e.args[0])
exit(1)
for option in options.options or []:
key, sep, val = option.partition('=')
if not sep:
log.error('Invalid option "%s"', option)
exit(1)
config.override(key.strip(), val.strip())
apis = config.get('apis').split()
# Find available groups based on the given APIs
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment