Skip to content

Commit b4d82e7

Browse files
committed
transitioned to RuntimeError
1 parent 1d5d891 commit b4d82e7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/cs50/cs50.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import print_function
22

33
import inspect
4+
import os
45
import re
56
import sys
67

@@ -49,7 +50,7 @@ def _formatException(type, value, tb):
4950

5051
# Highlight lines not referring to files in site-packages
5152
lines = []
52-
for line in format_exception(type, value, None if type == RuntimeError else tb): # Don't print tracebacks for deprecations
53+
for line in format_exception(type, value, tb):
5354
matches = re.search(r"^ File \"([^\"]+)\", line \d+, in .+", line)
5455
if matches and matches.group(1).startswith(packages):
5556
lines += line

0 commit comments

Comments
 (0)