mirror of
https://github.com/openSUSE/osc.git
synced 2025-08-23 14:48:53 +02:00
Merge branch 'detailed_error_int_review' of https://github.com/lethliel/osc
Be more verbose in case of an HTTPError in core.request_interactive_review.
This commit is contained in:
@@ -7385,6 +7385,13 @@ def request_interactive_review(apiurl, request, initial_cmd='', group=None,
|
|||||||
return True
|
return True
|
||||||
except HTTPError as e:
|
except HTTPError as e:
|
||||||
print('Server returned an error:', e, file=sys.stderr)
|
print('Server returned an error:', e, file=sys.stderr)
|
||||||
|
details = e.hdrs.get('X-Opensuse-Errorcode')
|
||||||
|
if details:
|
||||||
|
print(details, file=sys.stderr)
|
||||||
|
root = ET.fromstring(e.read())
|
||||||
|
summary = root.find('summary')
|
||||||
|
if summary is not None:
|
||||||
|
print(summary.text, file=sys.stderr)
|
||||||
print('Try -f to force the state change', file=sys.stderr)
|
print('Try -f to force the state change', file=sys.stderr)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user