Skip to content

Commit 7648da2

Browse files
committed
fix issue #70, bug introduced in recent memory profiler improvements
(cherry picked from commit 3ae6ade16a2cd3c3dec25b56c90c67330293284a)
1 parent 85aa286 commit 7648da2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

rdbtools/memprofiler.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ def __init__(self, out):
7878
"size_in_bytes", "encoding", "num_elements", "len_largest_element"))
7979

8080
def next_record(self, record) :
81+
if record.key is None:
82+
return # some records are not keys (e.g. dict)
8183
self._out.write("%d,%s,%s,%d,%s,%d,%d\n" % (record.database, record.type, encode_key(record.key),
8284
record.bytes, record.encoding, record.size, record.len_largest_element))
8385

0 commit comments

Comments
 (0)