Issue #18874: allow to call tracemalloc.Snapshot.statistics(cumulative=True)

with traceback_limit=1
This commit is contained in:
Victor Stinner 2013-11-26 00:45:47 +01:00
parent 00773df9f3
commit 8e3708d88b
2 changed files with 1 additions and 6 deletions

View file

@ -380,10 +380,6 @@ class Snapshot:
if cumulative and key_type not in ('lineno', 'filename'):
raise ValueError("cumulative mode cannot by used "
"with key type %r" % key_type)
if cumulative and self.traceback_limit < 2:
raise ValueError("cumulative mode needs tracebacks with at least "
"2 frames, traceback limit is %s"
% self.traceback_limit)
stats = {}
tracebacks = {}