mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-25 17:36:13 +01:00
get_package_results: check actual package status
At the moment only the project status is taken into account when determining when to stop watching a build. This leads to wrong behavior when a package is in 'blocked' for a longer time. In this state the project status and code is 'published' but the package remains at 'blocked'. With this additional check this problem is fixed.
This commit is contained in:
parent
bdec204600
commit
a536ef5e64
@ -5536,7 +5536,12 @@ def get_package_results(apiurl, project, package, wait=False, *args, **kwargs):
|
||||
elif result.get('code') in waiting_states:
|
||||
waiting = True
|
||||
break
|
||||
|
||||
else:
|
||||
pkg = result.find('status')
|
||||
if pkg.get('code') in waiting_states:
|
||||
waiting = True
|
||||
break
|
||||
|
||||
if not wait or not waiting:
|
||||
break
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user