Show More
@@ -89,6 +89,7 b' class DisplayHook(Configurable):' | |||||
89 | sio = io.StringIO(cell) |
|
89 | sio = io.StringIO(cell) | |
90 | tokens = list(tokenize.generate_tokens(sio.readline)) |
|
90 | tokens = list(tokenize.generate_tokens(sio.readline)) | |
91 |
|
91 | |||
|
92 | try: | |||
92 | for token in reversed(tokens): |
|
93 | for token in reversed(tokens): | |
93 | if token.type in (tokenize.ENDMARKER, tokenize.COMMENT): |
|
94 | if token.type in (tokenize.ENDMARKER, tokenize.COMMENT): | |
94 | continue |
|
95 | continue | |
@@ -96,6 +97,9 b' class DisplayHook(Configurable):' | |||||
96 | return True |
|
97 | return True | |
97 | else: |
|
98 | else: | |
98 | return False |
|
99 | return False | |
|
100 | except IndexError: | |||
|
101 | # some uses of ipshellembed may fail here | |||
|
102 | return False | |||
99 |
|
103 | |||
100 | def start_displayhook(self): |
|
104 | def start_displayhook(self): | |
101 | """Start the displayhook, initializing resources.""" |
|
105 | """Start the displayhook, initializing resources.""" |
General Comments 0
You need to be logged in to leave comments.
Login now