Skip to content
Snippets Groups Projects
Commit fca373b0 authored by Tobias Melson's avatar Tobias Melson
Browse files

Display info if package does not exist on server

parent 93c6491d
No related branches found
No related tags found
1 merge request!5Display info if package does not exist on server
Pipeline #163563 passed
...@@ -48,7 +48,14 @@ def do_mpcdf_build_status(self, subcmd, opts, *args): ...@@ -48,7 +48,14 @@ def do_mpcdf_build_status(self, subcmd, opts, *args):
if project.startswith("software:") or project == "home:{0}".format(user): if project.startswith("software:") or project == "home:{0}".format(user):
print(project) print(project)
project_url = osc.core.makeurl(api_url, ["build", project, "_result?view=status&multibuild=1&package={0}".format(package)]) project_url = osc.core.makeurl(api_url, ["build", project, "_result?view=status&multibuild=1&package={0}".format(package)])
resultlist = ElementTree.fromstringlist(osc.core.streamfile(project_url, osc.core.http_GET)) try:
resultlist = ElementTree.fromstringlist(osc.core.streamfile(project_url, osc.core.http_GET))
except osc.core.HTTPError as e:
if e.code == 404:
print(" {0} not found".format(package))
continue
else:
raise e
actualPackages = set() actualPackages = set()
for result in resultlist.findall("./result"): for result in resultlist.findall("./result"):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment