Commit 7917d522 authored by 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.
parent 7000d6d2
...@@ -70,7 +70,7 @@ class InteractiveInterpreter: ...@@ -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
......
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