maven: Fix argument of type 'NoneType' is not iterable
Related to T3874
This commit is contained in:
parent
7c8428d01c
commit
10bb8db345
1 changed files with 8 additions and 5 deletions
|
@ -261,11 +261,14 @@ class MavenLister(Lister[MavenListerState, RepoPage]):
|
|||
try:
|
||||
response = self.page_request(pom, {})
|
||||
project = xmltodict.parse(response.content.decode())
|
||||
if "scm" in project["project"]:
|
||||
if "connection" in project["project"]["scm"]:
|
||||
scm = project["project"]["scm"]["connection"]
|
||||
gid = project["project"]["groupId"]
|
||||
aid = project["project"]["artifactId"]
|
||||
project_d = project.get("project", {})
|
||||
scm_d = project_d.get("scm")
|
||||
if scm_d is not None:
|
||||
connection = scm_d.get("connection")
|
||||
if connection is not None:
|
||||
scm = connection
|
||||
gid = project_d["groupId"]
|
||||
aid = project_d["artifactId"]
|
||||
artifact_metadata_d = {
|
||||
"type": "scm",
|
||||
"doc": out_pom[pom],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue