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

Replace validate-modules's semantic markup parser with antsibull-docs-parser #80406

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -33,8 +33,14 @@
from contextlib import contextmanager
from fnmatch import fnmatch

from antsibull_docs_parser import dom
from antsibull_docs_parser.parser import parse, Context
try:
from antsibull_docs_parser import dom
from antsibull_docs_parser.parser import parse, Context
except ImportError:
import traceback
ANTSIBULL_DOCS_PARSER_FAILURE = traceback.format_exc()
else:
ANTSIBULL_DOCS_PARSER_FAILURE = None
mattclay marked this conversation as resolved.
Show resolved Hide resolved

import yaml

Expand Down Expand Up @@ -2611,6 +2617,10 @@ def run():


def main():
if ANTSIBULL_DOCS_PARSER_FAILURE is not None:
print('FATAL ERROR: Cannot import antsibull-docs-parser')
print(ANTSIBULL_DOCS_PARSER_FAILURE)
sys.exit(255)
try:
run()
except KeyboardInterrupt:
Expand Down
Expand Up @@ -20,8 +20,12 @@
from ansible.utils.version import SemanticVersion
from ansible.release import __version__

from antsibull_docs_parser import dom
from antsibull_docs_parser.parser import parse, Context
try:
from antsibull_docs_parser import dom
from antsibull_docs_parser.parser import parse, Context
except ImportError:
# Handled in main.py
pass

from .utils import parse_isodate

Expand Down