mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-28 13:12:11 +01:00
Merge branch 'master' of https://github.com/andreas-schwab/osc
Use ET to parse the error xml in metafile.edit.
This commit is contained in:
commit
ee34429d75
@ -3697,9 +3697,10 @@ class metafile:
|
|||||||
print('BuildService API error:', error_help, file=sys.stderr)
|
print('BuildService API error:', error_help, file=sys.stderr)
|
||||||
# examine the error - we can't raise an exception because we might want
|
# examine the error - we can't raise an exception because we might want
|
||||||
# to try again
|
# to try again
|
||||||
data = e.read()
|
root = ET.fromstring(e.read())
|
||||||
if b'<summary>' in data:
|
summary = root.find('summary')
|
||||||
print(data.split(b'<summary>')[1].split(b'</summary>')[0], file=sys.stderr)
|
if summary is not None:
|
||||||
|
print(summary.text, file=sys.stderr)
|
||||||
ri = raw_input('Try again? ([y/N]): ')
|
ri = raw_input('Try again? ([y/N]): ')
|
||||||
if ri not in ['y', 'Y']:
|
if ri not in ['y', 'Y']:
|
||||||
break
|
break
|
||||||
|
Loading…
x
Reference in New Issue
Block a user