mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-10 06:46:15 +01: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:
parent
00d38be5c3
commit
9d0725b2d4
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user