mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
mwh@sourceforge found that UnicodeError can be raised by compiling.
Its base class ValueError can be raised too, so catch that.
This commit is contained in:
parent
a770e866d6
commit
48450cf0a9
1 changed files with 1 additions and 1 deletions
|
@ -70,7 +70,7 @@ class InteractiveInterpreter:
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
code = compile_command(source, filename, symbol)
|
code = compile_command(source, filename, symbol)
|
||||||
except (OverflowError, SyntaxError):
|
except (OverflowError, SyntaxError, ValueError):
|
||||||
# Case 1
|
# Case 1
|
||||||
self.showsyntaxerror(filename)
|
self.showsyntaxerror(filename)
|
||||||
return 0
|
return 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue