Cope with missing root.

This commit is contained in:
Jelmer Vernooij 2021-04-06 12:52:29 +01:00
parent ac553e1ae9
commit 0f08d14d81

View file

@ -186,6 +186,10 @@ class Pear(BuildSystem):
logging.warning("Unable to parse package.xml: %s", e)
return
if not tree.root:
# No root?
return
for ns in cls.PEAR_NAMESPACES:
if tree.root.tag == '{%s}package' % ns:
logging.debug("Found package.xml with namespace %s, assuming pear package.")