action #3078 - adapt check_command to the new dashboard route

This commit is contained in:
Alberto Planas 2014-08-22 14:12:46 +02:00
parent 41737dee1e
commit af41f78daa
5 changed files with 6 additions and 3 deletions

View File

@ -107,9 +107,11 @@ class CheckCommand(object):
report = []
if project:
url = self.api.makeurl(('factory', 'staging_projects', project + '.json'))
url = self.api.makeurl(('distributions', 'openSUSE:%s' % self.api.opensuse,
'staging_projects', project + '.json'))
else:
url = self.api.makeurl(('factory', 'staging_projects.json'))
url = self.api.makeurl(('distributions', 'openSUSE:%s' % self.api.opensuse,
'staging_projects.json'))
info = json.load(self.api.retried_GET(url))
if not project:
for prj in info:

View File

@ -527,7 +527,8 @@ class StagingAPI(object):
_prefix = 'openSUSE:{}:Staging:'.format(self.opensuse)
if project.startswith(_prefix):
project = project.replace(_prefix, '')
url = self.makeurl(('factory', 'staging_projects', project + '.json'))
url = self.makeurl(('distributions', 'openSUSE:%s' % self.opensuse,
'staging_projects', project + '.json'))
result = json.load(self.retried_GET(url))
return result['overall_state'] == 'acceptable'