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:
Guido van Rossum 2001-01-15 18:13:35 +00:00
parent a770e866d6
commit 48450cf0a9
1 changed files with 1 additions and 1 deletions

View File

@ -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