Permalink
Browse files

Fix display of errors in compiled code on Python 3.

Closes gh-1100
  • Loading branch information...
takluyver committed Dec 5, 2011
1 parent fbed9d1 commit 335701761090f7fc988f9378383fc60e8aff8d0d
Showing with 1 addition and 1 deletion.
  1. +1 −1 IPython/core/ultratb.py
View
@@ -879,7 +879,7 @@ def linereader(file=file, lnum=[lnum], getline=linecache.getline):
# enclosing scope.
for token in generate_tokens(linereader):
tokeneater(*token)
- except IndexError:
+ except (IndexError, UnicodeDecodeError):
# signals exit of tokenizer
pass
except tokenize.TokenError,msg:

0 comments on commit 3357017

Please sign in to comment.