Open package.xml, not the directory.
This commit is contained in:
parent
72b9fe6f54
commit
ac553e1ae9
1 changed files with 3 additions and 2 deletions
|
@ -175,12 +175,13 @@ class Pear(BuildSystem):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def probe(cls, path):
|
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
|
return
|
||||||
|
|
||||||
import xml.etree.ElementTree as ET
|
import xml.etree.ElementTree as ET
|
||||||
try:
|
try:
|
||||||
tree = ET.iterparse(path)
|
tree = ET.iterparse(package_xml_path)
|
||||||
except ET.ParseError as e:
|
except ET.ParseError as e:
|
||||||
logging.warning("Unable to parse package.xml: %s", e)
|
logging.warning("Unable to parse package.xml: %s", e)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue