|
|
|
|
@ -97,10 +97,10 @@ def get_docstring(filename, verbose=False):
|
|
|
|
|
fragment_yaml = getattr(fragment_class, fragment_var, '{}')
|
|
|
|
|
fragment = AnsibleLoader(fragment_yaml, file_name=filename).get_single_data()
|
|
|
|
|
|
|
|
|
|
if fragment.has_key('notes'):
|
|
|
|
|
if 'notes' in fragment:
|
|
|
|
|
notes = fragment.pop('notes')
|
|
|
|
|
if notes:
|
|
|
|
|
if not doc.has_key('notes'):
|
|
|
|
|
if 'notes' not in doc:
|
|
|
|
|
doc['notes'] = []
|
|
|
|
|
doc['notes'].extend(notes)
|
|
|
|
|
|
|
|
|
|
@ -108,7 +108,7 @@ def get_docstring(filename, verbose=False):
|
|
|
|
|
raise Exception("missing options in fragment, possibly misformatted?")
|
|
|
|
|
|
|
|
|
|
for key, value in fragment.items():
|
|
|
|
|
if not doc.has_key(key):
|
|
|
|
|
if key not in doc:
|
|
|
|
|
doc[key] = value
|
|
|
|
|
else:
|
|
|
|
|
if isinstance(doc[key], MutableMapping):
|
|
|
|
|
|