mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-30 11:24:50 +00:00
ansible-doc-test: Ignore unhandled paths
Currently the script is failing with The given path '...' is not valid if a path is not handled by the script. This is resulting in issues if module_utils and action plugins are updated for example. The solution is to simply ignore paths that are not handled.
This commit is contained in:
@@ -86,8 +86,8 @@ def ansible_doc_test(path, verbose):
|
|||||||
if module == "":
|
if module == "":
|
||||||
module = None
|
module = None
|
||||||
elif len(_path) > 1:
|
elif len(_path) > 1:
|
||||||
print("The given path '%s' is not valid." % path)
|
# Ignore other paths
|
||||||
sys.exit(1)
|
return 0
|
||||||
|
|
||||||
elif path in ["roles", "roles/"]:
|
elif path in ["roles", "roles/"]:
|
||||||
# roles only
|
# roles only
|
||||||
@@ -97,14 +97,14 @@ def ansible_doc_test(path, verbose):
|
|||||||
if len(_path) == 1:
|
if len(_path) == 1:
|
||||||
module = _path[0]
|
module = _path[0]
|
||||||
else:
|
else:
|
||||||
print("The given path '%s' is not valid." % path)
|
# Ignore other paths
|
||||||
sys.exit(1)
|
return 0
|
||||||
elif path in ["plugins", "plugins/",
|
elif path in ["plugins", "plugins/",
|
||||||
"plugins/modules", "plugins/modules/"]:
|
"plugins/modules", "plugins/modules/"]:
|
||||||
only_modules = True
|
only_modules = True
|
||||||
else:
|
else:
|
||||||
print("The given path '%s' is not valid." % path)
|
# Ignore other paths
|
||||||
sys.exit(1)
|
return 0
|
||||||
|
|
||||||
errors = 0
|
errors = 0
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user