diff options
author | Guido van Rossum <guido@python.org> | 2001-01-15 18:13:35 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-01-15 18:13:35 (GMT) |
commit | 48450cf0a94765c010eddfbbfc5c85380e6a9a15 (patch) | |
tree | 56db51c06c0e64fdffcebc2206f5b282911674a9 /Lib | |
parent | a770e866d6fa985cd056c9d955ef05307acf105c (diff) | |
download | cpython-48450cf0a94765c010eddfbbfc5c85380e6a9a15.zip cpython-48450cf0a94765c010eddfbbfc5c85380e6a9a15.tar.gz cpython-48450cf0a94765c010eddfbbfc5c85380e6a9a15.tar.bz2 |
mwh@sourceforge found that UnicodeError can be raised by compiling.
Its base class ValueError can be raised too, so catch that.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/code.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/code.py b/Lib/code.py index 3cd33de..846cd04 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 |