From ac553e1ae9359deaddf9c9cc948cd0f03ff8ea70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jelmer=20Vernoo=C4=B3?= Date: Tue, 6 Apr 2021 00:13:57 +0100 Subject: [PATCH] Open package.xml, not the directory. --- ognibuild/buildsystem.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ognibuild/buildsystem.py b/ognibuild/buildsystem.py index bc05873..5c54eab 100644 --- a/ognibuild/buildsystem.py +++ b/ognibuild/buildsystem.py @@ -175,12 +175,13 @@ class Pear(BuildSystem): @classmethod def probe(cls, path): - if not os.path.exists(os.path.join(path, "package.xml")): + package_xml_path = os.path.join(path, "package.xml") + if not os.path.exists(package_xml_path): return import xml.etree.ElementTree as ET try: - tree = ET.iterparse(path) + tree = ET.iterparse(package_xml_path) except ET.ParseError as e: logging.warning("Unable to parse package.xml: %s", e) return