Skip to content

fix(catalog): handle decode errors in load_manifest in generate-extensions-catalog.py - #2622

Open
mohitchauhan221 wants to merge 1 commit into
Osmantic:mainfrom
mohitchauhan221:fix/generate-extensions-catalog-decode-exceptions
Open

fix(catalog): handle decode errors in load_manifest in generate-extensions-catalog.py#2622
mohitchauhan221 wants to merge 1 commit into
Osmantic:mainfrom
mohitchauhan221:fix/generate-extensions-catalog-decode-exceptions

Conversation

@mohitchauhan221

Copy link
Copy Markdown

Problem

In ods/scripts/generate-extensions-catalog.py, load_manifest() opens service extension manifest YAML files via manifest_path.read_text(encoding="utf-8"). If a manifest file contains non-UTF-8 bytes or decode errors occur during parsing, a UnicodeDecodeError or ValueError could escape the exception handler block.

Fix

Include UnicodeDecodeError and ValueError in the exception handler block in load_manifest(), logging a warning to stderr and returning None gracefully.

Verification

Verified syntax with python3 -m py_compile ods/scripts/generate-extensions-catalog.py. git diff --check passed cleanly.

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.

2 participants