diff --git a/src/calibre/utils/xml_parse.py b/src/calibre/utils/xml_parse.py index de5cee860d..a97fa29bf5 100644 --- a/src/calibre/utils/xml_parse.py +++ b/src/calibre/utils/xml_parse.py @@ -54,7 +54,7 @@ def find_tests(): ('PUBLIC', external, None), ('PUBLIC', 'http://example.com', None), ): - got = safe_xml_fromstring(templ.format(id=eid, val=val)).text + got = getattr(safe_xml_fromstring(templ.format(id=eid, val=val)), 'text', None) self.assertEqual(got, expected) return unittest.defaultTestLoader.loadTestsFromTestCase(TestXMLParse)