changed the paths again after discussion

This commit is contained in:
Stephan Kulow 2014-08-25 12:44:05 +02:00
parent af41f78daa
commit e2ff3e8afa
5 changed files with 4 additions and 6 deletions

View File

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

View File

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