Kaydet (Commit) 48450cf0 authored tarafından Guido van Rossum's avatar Guido van Rossum

mwh@sourceforge found that UnicodeError can be raised by compiling.

Its base class ValueError can be raised too, so catch that.
üst a770e866
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment