Skip to content

Commit 82af056

Browse files
committed
ignoring NotImplementedError tracebacks
1 parent cd813b4 commit 82af056

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/cs50/cs50.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from distutils.sysconfig import get_python_lib
88
from os.path import abspath, join
99
from termcolor import colored
10-
from traceback import extract_tb, format_list, format_exception_only, format_exception
10+
from traceback import format_exception
1111

1212

1313
class flushfile():
@@ -44,6 +44,10 @@ def formatException(type, value, tb):
4444
https://stackoverflow.com/a/46071447/5156190
4545
"""
4646

47+
# Don't print tracebacks for deprecations
48+
if type == NotImplementedError:
49+
return "".join(format_exception(type, value, None)).rstrip()
50+
4751
# Absolute paths to site-packages
4852
packages = tuple(join(abspath(p), "") for p in sys.path[1:])
4953

0 commit comments

Comments
 (0)