Skip to content

Commit 7425e5d

Browse files
committed
fix: Add error handling when neither section nor object name is provided
1 parent 6324afd commit 7425e5d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/script_metadata_extractor.py

+7
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ def _start_new_block(self, line: str, row: int) -> dict | None:
5757

5858
extraction_part = tag_items[3].strip() if len(tag_items) > 3 else None
5959

60+
if not extraction_part and extraction_type != "full":
61+
logger.error(
62+
f"Extraction part is not provided for {extraction_type} extraction type. "
63+
"Skipping."
64+
)
65+
return None
66+
6067
return {
6168
"start": row,
6269
"path": path,

0 commit comments

Comments
 (0)