summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Rohdewald <wolfgang@rohdewald.de>2015-11-27 13:03:45 (GMT)
committerWolfgang Rohdewald <wolfgang@rohdewald.de>2016-08-24 11:47:05 (GMT)
commit4d9d4213e486992bd218e75bcc942926a45e8b75 (patch)
tree34bcebad53abc6278b24623b469924e397a993c1
parentfc46ebed2a45051ce7734b64e137870cc839a92b (diff)
log.callers: simplify, fixing bug: suppressed too much
-rw-r--r--src/util.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/util.py b/src/util.py
index 5f95057..922d2c0 100644
--- a/src/util.py
+++ b/src/util.py
@@ -68,8 +68,10 @@ def callers(count=1, exclude=None):
excluding.extend(['callExpressionReceived', 'proto_answer'])
excluding.extend(['_dataReceived', 'dataReceived', 'gotItem'])
excluding.extend(['callWithContext', '_doReadOrWrite', 'doRead'])
- names = list(reversed([x[2] for x in stck[:-2] if x[2] not in excluding]))
- result = '.'.join(names[-count - 2:])
+ excluding.extend(['callers', 'debug'])
+ names = list(([x[2] for x in stck if x[2] not in excluding]))
+ names = reversed(names[-count:])
+ result = '.'.join(names)
return '[{}]'.format(result)