From 8e3708d88ba868eb2d915f0793c0bc0bb5f58b50 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 26 Nov 2013 00:45:47 +0100 Subject: Issue #18874: allow to call tracemalloc.Snapshot.statistics(cumulative=True) with traceback_limit=1 --- Lib/tracemalloc.py | 4 ---- 1 file changed, 4 deletions(-) (limited to 'Lib/tracemalloc.py') diff --git a/Lib/tracemalloc.py b/Lib/tracemalloc.py index 7780eca77d..d51f1617ec 100644 --- a/Lib/tracemalloc.py +++ b/Lib/tracemalloc.py @@ -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 = {} -- cgit v1.2.1