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