Commit 4f7ba95
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]>1 parent 8723f19 commit 4f7ba95
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
538 | 538 | | |
539 | 539 | | |
540 | 540 | | |
541 | | - | |
| 541 | + | |
542 | 542 | | |
543 | 543 | | |
544 | 544 | | |
| |||
563 | 563 | | |
564 | 564 | | |
565 | 565 | | |
566 | | - | |
| 566 | + | |
567 | 567 | | |
568 | 568 | | |
569 | 569 | | |
| |||
0 commit comments