From 6a5cc61adce341fb9547e9507a8889ebca726427 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 8 Jan 2020 22:32:26 +0530 Subject: [PATCH] Possible fix for weird failure on CI --- src/calibre/utils/xml_parse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)