Skip to content

Commit f73e80f

Browse files
committed
Catch exceptions liberally when looking for sources.
Fix django-commons#279.
1 parent 5d5469e commit f73e80f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

debug_toolbar/utils/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def getframeinfo(frame, context=1):
146146
start = lineno - 1 - context // 2
147147
try:
148148
lines, lnum = inspect.findsource(frame)
149-
except (IOError, IndexError):
149+
except Exception: # findsource raises platform-dependant exceptions
150150
lines = index = None
151151
else:
152152
start = max(start, 1)

0 commit comments

Comments
 (0)