move file_to_list to cdist
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
cf97fd9837
commit
e26f612012
3 changed files with 16 additions and 23 deletions
|
|
@ -43,10 +43,10 @@ def run(argv):
|
|||
|
||||
parser = argparse.ArgumentParser(add_help=False)
|
||||
|
||||
for parameter in cdist.path.file_to_list(os.path.join(param_dir, "optional")):
|
||||
for parameter in cdist.file_to_list(os.path.join(param_dir, "optional")):
|
||||
argument = "--" + parameter
|
||||
parser.add_argument(argument, action='store', required=False)
|
||||
for parameter in cdist.path.file_to_list(os.path.join(param_dir, "required")):
|
||||
for parameter in cdist.file_to_list(os.path.join(param_dir, "required")):
|
||||
argument = "--" + parameter
|
||||
parser.add_argument(argument, action='store', required=True)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue