Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MB-45684: Fix cbstats stats_key and stats_vkey error messages
The exception is now printed rather than hitting an AttributeError. e.g., Memcached error #1: KEY_ENOENT : Not Found : Rather than the previous: Traceback (most recent call last): File ".../engines/ep/management/cbstats", line 539, in stats_key vbs = mc.stats(cmd) File ".../engines/ep/management/mc_bin_client.py", line 636, in stats cmd, opaque, cas, klen, extralen, data = self._handleKeyedResponse(None) File ".../engines/ep/management/mc_bin_client.py", line 292, in _handleKeyedResponse raise MemcachedError(errcode, msg) mc_bin_client.ErrorKeyEnoent: Memcached error #1: KEY_ENOENT : Not Found : During handling of the above exception, another exception occurred: Traceback (most recent call last): File ".../engines/ep/management/cbstats", line 1010, in <module> main() File ".../engines/ep/management/cbstats", line 1007, in main c.execute() File ".../engines/ep/management/clitool.py", line 83, in execute f[0](mc, *args[2:], **opts.__dict__) File ".../engines/ep/management/cbstats", line 49, in g f(*args, **kwargs) File ".../engines/ep/management/cli_auth_utils.py", line 106, in g f(*args, **kwargs) File ".../engines/ep/management/cbstats", line 541, in stats_key print(e.message) AttributeError: 'ErrorKeyEnoent' object has no attribute 'message' Change-Id: Iae887189b485e1c62dd5f5ceba599e0660502067 Reviewed-on: http://review.couchbase.org/c/kv_engine/+/151234 Reviewed-by: Daniel Owen <[email protected]> Tested-by: James Harrison <[email protected]> Tested-by: Build Bot <[email protected]>
- Loading branch information