1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-09-20 01:06:17 +02:00

Fix local service run for non-existent (server-side) package

If a package does not exist on the server, the
Serviceinfo.getProjectGlobalServices call results in a 404. In this
case, we try it again with the _project package (note: this does not
take potential "linked" services into account, if the local package
is a _link).

Fixes: #277 ("404 on running service for non commited package")
This commit is contained in:
Marcus Huewe 2017-03-10 11:08:31 +01:00
parent 00d38be5c3
commit 9d0725b2d4

View File

@ -308,7 +308,10 @@ class Serviceinfo:
self.project = project
self.package = package
except HTTPError as e:
if e.code != 403 and e.code != 400:
if e.code == 404 and package != '_project':
self.getProjectGlobalServices(apiurl, project, '_project')
self.package = package
elif e.code != 403 and e.code != 400:
raise e
def addVerifyFile(self, serviceinfo_node, filename):