Skip to content

Commit

Permalink
- show errors when request change failed
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianschroeter committed May 15, 2014
1 parent 42c3573 commit 3e7f355
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion osc/commandline.py
Original file line number Diff line number Diff line change
Expand Up @@ -2313,8 +2313,11 @@ def do_request(self, subcmd, opts, *args):
details = e.headers.get('X-Opensuse-Errorcode')
if details:
print(details, file=sys.stderr)
root = ET.fromstring(e.read())
summary = root.find('summary')
if not summary is None:
print(summary.text)
if opts.or_revoke:
body = e.read()
if e.code in [ 400, 403, 404, 500 ]:
print('Revoking it ...')
r = change_request_state(apiurl,
Expand Down

0 comments on commit 3e7f355

Please sign in to comment.