mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +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:
|
||||
code = compile_command(source, filename, symbol)
|
||||
except (OverflowError, SyntaxError):
|
||||
except (OverflowError, SyntaxError, ValueError):
|
||||
# Case 1
|
||||
self.showsyntaxerror(filename)
|
||||
return 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue