fix mising default role_dir

This commit is contained in:
Robert Kaussow 2019-10-11 08:59:24 +02:00
parent 192f2bf5c7
commit 85d835df48
2 changed files with 3 additions and 3 deletions

View File

@ -102,9 +102,9 @@ class Annotation:
try:
content = {key: json.loads(parts[2].strip())}
except ValueError:
content = {key: parts[2].strip()}
content = [parts[2].strip()]
else:
content = parts[2]
content = [parts[2]]
item.data[key][parts[1]] = content

View File

@ -35,7 +35,7 @@ class AnsibleDoctor:
# TODO: add function to print to stdout instead of file
parser = argparse.ArgumentParser(
description="Generate documentation from annotated Ansible roles using templates")
parser.add_argument("role_dir", help="role directory (default: current working dir)")
parser.add_argument("role_dir", nargs="?", help="role directory (default: current working dir)")
parser.add_argument("-c", "--config", dest="config_file", help="location of configuration file")
parser.add_argument("-o", "--output", dest="output_dir", action="store",
help="output base dir")