Fix for status checks in check command
This commit is contained in:
parent
82c64003c4
commit
1ca260e663
@ -57,10 +57,12 @@ class CheckCommand(object):
|
||||
report.append(' - Missing check: ' + check.get('name'))
|
||||
|
||||
for check in project.findall('checks/*'):
|
||||
if check.get('state') != 'success':
|
||||
info = " - %s check: %s" % (check.get('state'), check.get('name'))
|
||||
if check.get('url'):
|
||||
info += " " + check.get('url')
|
||||
state = check.find('state').text
|
||||
if state != 'success':
|
||||
info = " - %s check: %s" % (state, check.get('name'))
|
||||
url = check.find('url')
|
||||
if url is not None:
|
||||
info += " " + url.text
|
||||
report.append(info)
|
||||
break
|
||||
|
||||
@ -89,11 +91,11 @@ class CheckCommand(object):
|
||||
:param project: project to check, None for all
|
||||
"""
|
||||
if project:
|
||||
report = self._check_project(project)
|
||||
report = self._check_project(project)
|
||||
else:
|
||||
report = []
|
||||
for project in self.api.get_staging_projects():
|
||||
report.extend(self._check_project(project))
|
||||
report = []
|
||||
for project in self.api.get_staging_projects():
|
||||
report.extend(self._check_project(project))
|
||||
|
||||
print('\n'.join(report))
|
||||
|
||||
|
@ -880,8 +880,8 @@ class StagingAPI(object):
|
||||
if not staging:
|
||||
raise oscerr.WrongArgs('No staging given')
|
||||
|
||||
import traceback
|
||||
traceback.print_stack()
|
||||
#import traceback
|
||||
#traceback.print_stack()
|
||||
opts = {}
|
||||
if requests:
|
||||
opts['requests'] = 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user