diff options
author | Bryan Newbold <bnewbold@archive.org> | 2021-11-03 20:26:02 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2021-11-03 20:26:02 -0700 |
commit | 6ad771e195065a1f22ddbe5a4098acc70137be9b (patch) | |
tree | 4f1c4b751118c3f65573edf63bd9f0d52224b608 /grobid_tei_xml/parse.py | |
parent | 1f57527aa621525d46e9ddbbd4bab2682df8d67e (diff) | |
download | grobid_tei_xml-6ad771e195065a1f22ddbe5a4098acc70137be9b.tar.gz grobid_tei_xml-6ad771e195065a1f22ddbe5a4098acc70137be9b.zip |
handle 'bare' editor names
Diffstat (limited to 'grobid_tei_xml/parse.py')
-rwxr-xr-x | grobid_tei_xml/parse.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/grobid_tei_xml/parse.py b/grobid_tei_xml/parse.py index dea1f2e..ebdf65b 100755 --- a/grobid_tei_xml/parse.py +++ b/grobid_tei_xml/parse.py @@ -114,7 +114,7 @@ def _parse_editor(elem: ET.Element, ns: str = ns) -> List[GrobidAuthor]: """ persname_tags = elem.findall(f"./{{{ns}}}persName") - if persname_tags is None: + if len(persname_tags or []) == 0: if elem.find("*") is None: # sometimes there is a "bare" editor name we can use raw_name = elem.text |