projects.py: Add command getval

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2017-07-04 17:58:14 +00:00
commit 657d306bed

View file

@ -516,6 +516,14 @@ def cmd_check(args_):
' '.join(args.module))
exit(0)
def cmd_getval(args_):
parser = argparse.ArgumentParser(description='Get value from project config')
parser.add_argument('--project', default = top_name, help = 'Project name')
parser.add_argument('section', default = '', help = 'Config section')
parser.add_argument('key', default = '', help = 'Config key')
args=parser.parse_args(args_)
print(get_value(args.project, args.section, args.key))
# -------------------------------------------------------------------- here we go
global_args = []