Fix accept logic to actually work

This commit is contained in:
Ludwig Nussel 2016-06-09 13:11:45 +02:00
parent 45f722591b
commit bddcc12c8d
2 changed files with 5 additions and 3 deletions

View File

@ -191,7 +191,7 @@ def do_staging(self, subcmd, opts, *args):
# Is it safe to accept? Meaning: /totest contains what it should and is not dirty # Is it safe to accept? Meaning: /totest contains what it should and is not dirty
version_totest = api.get_binary_version(api.project, "openSUSE-release.rpm", repository="totest", arch="x86_64") version_totest = api.get_binary_version(api.project, "openSUSE-release.rpm", repository="totest", arch="x86_64")
if version_totest or opts.force: if version_totest is None or opts.force:
# SLE does not have a totest_version or openqa_version - ignore it # SLE does not have a totest_version or openqa_version - ignore it
version_openqa = version_totest version_openqa = version_totest
totest_dirty = False totest_dirty = False

View File

@ -1049,8 +1049,10 @@ class StagingAPI(object):
url = self.makeurl(['build', project, repository, arch, '_repository', "%s?view=fileinfo" % rpm]) url = self.makeurl(['build', project, repository, arch, '_repository', "%s?view=fileinfo" % rpm])
try: try:
return ET.parse(http_GET(url)).getroot().find('version').text return ET.parse(http_GET(url)).getroot().find('version').text
except urllib2.HTTPError: except urllib2.HTTPError, e:
return None if e.code == 404:
return None
raise
def load_file_content(self, project, package, filename): def load_file_content(self, project, package, filename):
""" """