cope with missing version tag.

This commit is contained in:
Jelmer Vernooij 2021-04-22 16:13:11 +01:00
parent 3cc91b8cb0
commit c2838029b5
2 changed files with 4 additions and 1 deletions

View file

@ -1373,10 +1373,11 @@ class Maven(BuildSystem):
deps_tag = root.find("dependencies")
if deps_tag:
for dep in deps_tag.findall("dependency"):
version_tag = dep.find("version")
yield "core", MavenArtifactRequirement(
dep.find("groupId").text,
dep.find("artifactId").text,
dep.find("version").text,
version_tag.text if version_tag else None,
)

View file

@ -213,10 +213,12 @@ class PerlPreDeclaredRequirement(Requirement):
KNOWN_MODULES = {
'auto_set_repository': 'Module::Install::Repository',
'author_tests': 'Module::Install::AuthorTests',
'author_requires': 'Module::Install::AuthorRequires',
'readme_from': 'Module::Install::ReadmeFromPod',
'catalyst': 'Module::Install::Catalyst',
'githubmeta': 'Module::Install::GithubMeta',
'use_ppport': 'Module::Install::XSUtil',
'pod_from': 'Module::Install::PodFromEuclid',
}
def __init__(self, name):