diff options
author | Zuul <zuul@review.opendev.org> | 2020-09-22 01:56:50 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2020-09-22 01:56:50 +0000 |
commit | d63ec1b38d724c66bdf0a6259e5184a97f378c77 (patch) | |
tree | 60fbb14acd723a8307fdeeb702ea84198e25c220 /swiftclient/shell.py | |
parent | 2c28691f86752cebc74b535c5b026ec81f7a94b4 (diff) | |
parent | 0f6713ed5b8cdcf5cbc0850dea224b41d90e63f4 (diff) | |
download | python-swiftclient-d63ec1b38d724c66bdf0a6259e5184a97f378c77.tar.gz |
Merge "Include transaction ID in ClientException.__str__"
Diffstat (limited to 'swiftclient/shell.py')
-rwxr-xr-x | swiftclient/shell.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/swiftclient/shell.py b/swiftclient/shell.py index b129d63..dbcd437 100755 --- a/swiftclient/shell.py +++ b/swiftclient/shell.py @@ -2058,8 +2058,9 @@ Examples: try: globals()['st_%s' % args[0]](parser, argv[1:], output) except ClientException as err: + trans_id = err.transaction_id + err.transaction_id = None # clear it so we aren't overly noisy output.error(str(err)) - trans_id = (err.http_response_headers or {}).get('X-Trans-Id') if trans_id: output.error("Failed Transaction ID: %s", parse_header_string(trans_id)) |