From b0b339c43d1e910c56af2ad6df752ed81d8568ce Mon Sep 17 00:00:00 2001 From: Stefan Klut Date: Wed, 22 Nov 2023 14:21:56 +0100 Subject: [PATCH] check for self.metadata is None --- page_xml/xmlPAGE.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/page_xml/xmlPAGE.py b/page_xml/xmlPAGE.py index ce4de15..1b819c4 100644 --- a/page_xml/xmlPAGE.py +++ b/page_xml/xmlPAGE.py @@ -252,6 +252,8 @@ def add_processing_step(self, git_hash: str, uuid: str, cfg: CfgNode, whitelist: raise TypeError(f"cfg is None") if whitelist is None: raise TypeError(f"whitelist is None") + if self.metadata is None: + raise TypeError(f"self.metadata is None") processing_step = ET.SubElement(self.metadata, "MetadataItem") processing_step.attrib = {