From b1275edb637617d42c9ef9acccaec46554c13828 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Tue, 4 Aug 2026 17:10:13 -0700 Subject: [PATCH] Scripts: Fixes failure in doc_outline_generator While it would be better to fix the error in the source, it shouldn't be a case of blocking release. Print the line that was failed to parse and then continue onwards. In particular hit by `ERROR:root:Failure to parse Thread shared code buffer management` --- Scripts/doc_outline_generator.py | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/Scripts/doc_outline_generator.py b/Scripts/doc_outline_generator.py index 501a5e2df..a8aa7628f 100755 --- a/Scripts/doc_outline_generator.py +++ b/Scripts/doc_outline_generator.py @@ -20,6 +20,8 @@ import re from pathlib import Path import sys +import traceback +import logging if (len(sys.argv) != 4): print("doc_outline_generator GIT_DIR SRC_DIR LINK_PREFIX") @@ -62,17 +64,29 @@ for path in Paths: name = entry.split(":", 1)[0].strip(); val = entry.split(":", 1)[1].strip(); if name == "category": - cat_name = val.split("~", 1)[0].strip(); - cat_val = val.split("~", 1)[1].strip(); - CategoryLabels[cat_name] = cat_val + try: + cat_name = val.split("~", 1)[0].strip(); + cat_val = val.split("~", 1)[1].strip(); + CategoryLabels[cat_name] = cat_val + except Exception as e: + logging.error("Failure to parse {}".format(val)) + logging.error(traceback.format_exc()) elif name == "meta": - meta_name = val.split("~", 1)[0].strip(); - meta_val = val.split("~", 1)[1].strip(); - MetaLabels[meta_name] = meta_val + try: + meta_name = val.split("~", 1)[0].strip(); + meta_val = val.split("~", 1)[1].strip(); + MetaLabels[meta_name] = meta_val + except Exception as e: + logging.error("Failure to parse {}".format(val)) + logging.error(traceback.format_exc()) elif name == "glossary": - glossary_name = val.split("~", 1)[0].strip(); - glossary_val = val.split("~", 1)[1].strip(); - GlossaryLabels[glossary_name] = glossary_val + try: + glossary_name = val.split("~", 1)[0].strip(); + glossary_val = val.split("~", 1)[1].strip(); + GlossaryLabels[glossary_name] = glossary_val + except Exception as e: + logging.error("Failure to parse {}".format(val)) + logging.error(traceback.format_exc()) elif name == "tags": for meta_name in val.split(","): if meta_name.strip() not in Meta: