Fix accept logic to actually work
This commit is contained in:
parent
45f722591b
commit
bddcc12c8d
@ -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
|
||||
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
|
||||
version_openqa = version_totest
|
||||
totest_dirty = False
|
||||
|
@ -1049,8 +1049,10 @@ class StagingAPI(object):
|
||||
url = self.makeurl(['build', project, repository, arch, '_repository', "%s?view=fileinfo" % rpm])
|
||||
try:
|
||||
return ET.parse(http_GET(url)).getroot().find('version').text
|
||||
except urllib2.HTTPError:
|
||||
except urllib2.HTTPError, e:
|
||||
if e.code == 404:
|
||||
return None
|
||||
raise
|
||||
|
||||
def load_file_content(self, project, package, filename):
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user