Skip to content
Snippets Groups Projects

Display info if package does not exist on server

Merged Tobias Melson requested to merge fix_build_status into master
1 file
+ 8
1
Compare changes
  • Side-by-side
  • Inline
+ 8
1
@@ -48,7 +48,14 @@ def do_mpcdf_build_status(self, subcmd, opts, *args):
if project.startswith("software:") or project == "home:{0}".format(user):
print(project)
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()
for result in resultlist.findall("./result"):
Loading