mirror of
https://github.com/ceph/ceph
synced 2024-12-29 06:52:35 +00:00
mgr/telemetry: dict.pop() errs on nonexistent key
I suggested this in a review, but failed to correctly understand what happens when the key doesn't exist. Test for it. Signed-off-by: Dan Mick <dan.mick@redhat.com>
This commit is contained in:
parent
8cd683aa60
commit
19028f0d9d
@ -336,7 +336,8 @@ class Module(MgrModule):
|
||||
|
||||
# anonymize the smartctl report itself
|
||||
for k in ['serial_number']:
|
||||
m.pop(k)
|
||||
if k in m:
|
||||
m.pop(k)
|
||||
|
||||
res[anon_devid] = m
|
||||
return res
|
||||
|
Loading…
Reference in New Issue
Block a user