From e9003694cdb7a5c874a7a3df0f226602fc0d8505 Mon Sep 17 00:00:00 2001 From: Dmitry Trofimov Date: Wed, 13 Jul 2016 02:02:58 +0200 Subject: [PATCH] Initialize the lines_count field with fallback to empty dict --- python/helpers/profiler/vmprof_profiler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/helpers/profiler/vmprof_profiler.py b/python/helpers/profiler/vmprof_profiler.py index 4567cee84887..e941abdcab15 100644 --- a/python/helpers/profiler/vmprof_profiler.py +++ b/python/helpers/profiler/vmprof_profiler.py @@ -88,7 +88,7 @@ def tree_stats_to_response(filename, response): tstats.name = node.name tstats.count = node.count tstats.children = [] - tstats.line_count = {} + tstats.line_count = getattr(node, 'lines', {}) if parent is not None: if parent.children is None: