1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-27 23:16:14 +01:00

Merge branch 'compat_multibuild' of https://github.com/lethliel/osc

Stop using the multibuild and locallink query parameters, if the api
does not support them (in get_package_results).
This commit is contained in:
Marcus Huewe 2017-03-09 15:14:31 +01:00
commit 00d38be5c3

View File

@ -5570,6 +5570,11 @@ def get_package_results(apiurl, project, package, wait=False, *args, **kwargs):
if e.code == 502 or e.code == 504:
# re-try result request
continue
root = ET.fromstring(e.read())
if e.code == 400 and kwargs.get('multibuild') and re.search('multibuild', getattr(root.find('summary'), 'text', '')):
kwargs['multibuild'] = None
kwargs['locallink'] = None
continue
raise
root = ET.fromstring(xml)
kwargs['oldstate'] = root.get('state')