Skip to content

Commit 48450cf

Browse files
committed
mwh@sourceforge found that UnicodeError can be raised by compiling.
Its base class ValueError can be raised too, so catch that.
1 parent a770e86 commit 48450cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def runsource(self, source, filename="<input>", symbol="single"):
7070
"""
7171
try:
7272
code = compile_command(source, filename, symbol)
73-
except (OverflowError, SyntaxError):
73+
except (OverflowError, SyntaxError, ValueError):
7474
# Case 1
7575
self.showsyntaxerror(filename)
7676
return 0

0 commit comments

Comments
 (0)