diff options
| -rw-r--r-- | debug_toolbar/utils/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/debug_toolbar/utils/__init__.py b/debug_toolbar/utils/__init__.py index 0a78dac..45dfc6f 100644 --- a/debug_toolbar/utils/__init__.py +++ b/debug_toolbar/utils/__init__.py @@ -129,7 +129,10 @@ def getframeinfo(frame, context=1): else: lines = index = None - return inspect.Traceback(filename, lineno, frame.f_code.co_name, lines, index) + if hasattr(inspect, 'Traceback'): + return inspect.Traceback(filename, lineno, frame.f_code.co_name, lines, index) + else: + return (filename, lineno, frame.f_code.co_name, lines, index) def get_stack(context=1): """ |
