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
|
@ -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…
Reference in New Issue