From: Guido van Rossum Date: Mon, 15 Jan 2001 18:13:35 +0000 (+0000) Subject: mwh@sourceforge found that UnicodeError can be raised by compiling. X-Git-Tag: v2.1a1~261 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=48450cf0a94765c010eddfbbfc5c85380e6a9a15;p=python mwh@sourceforge found that UnicodeError can be raised by compiling. Its base class ValueError can be raised too, so catch that. --- diff --git a/Lib/code.py b/Lib/code.py index 3cd33dee48..846cd04642 100644 --- a/Lib/code.py +++ b/Lib/code.py @@ -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