Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: exception statement syntax #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rasta-rocket
Copy link

@rasta-rocket rasta-rocket commented Jan 16, 2020

Wrong exception statement is used here:

$ ansible-doc -vvvv okta_groups
ansible-doc 2.9.2
  config file = None
  configured module search path = ['***']
  ansible python module location = /Users/foo/venv/ansible/lib/python3.7/site-packages/ansible
  executable location = /Users/foo/venv/ansible/bin/ansible-doc
  python version = 3.7.5 (default, Nov  1 2019, 02:16:32) [Clang 11.0.0 (clang-1100.0.33.8)]
No config file found; using defaults
 [ERROR]: unable to parse ***/library/okta_groups.py

Traceback (most recent call last):
  File "/Users/foo/venv/ansible/lib/python3.7/site-packages/ansible/cli/doc.py", line 195, in run
    doc, plainexamples, returndocs, metadata = DocCLI._get_plugin_doc(plugin, loader, search_paths)
  File "/Users/foo/venv/ansible/lib/python3.7/site-packages/ansible/cli/doc.py", line 302, in _get_plugin_doc
    doc, plainexamples, returndocs, metadata = get_docstring(filename, fragment_loader, verbose=(context.CLIARGS['verbosity'] > 0))
  File "/Users/foo/venv/ansible/lib/python3.7/site-packages/ansible/utils/plugin_docs.py", line 124, in get_docstring
    data = read_docstring(filename, verbose=verbose, ignore_errors=ignore_errors)
  File "/Users/foo/venv/ansible/lib/python3.7/site-packages/ansible/parsing/plugin_docs.py", line 40, in read_docstring
    M = ast.parse(b_module_data.read())
  File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ast.py", line 35, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 301
    except ValueError, e:
                     ^
SyntaxError: invalid syntax

ERROR! module okta_groups missing documentation (or could not parse documentation): invalid syntax (<unknown>, line 301)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant