Skip to content

Commit

Permalink
get_package_results: check actual package status
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ssedlmaier committed Sep 9, 2016
1 parent bdec204 commit a536ef5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion osc/core.py
Expand Up @@ -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:
Expand Down

0 comments on commit a536ef5

Please sign in to comment.