Skip to content

Commit dc67fda

Browse files
committed
Fix potential KeyError
1 parent a38a5e4 commit dc67fda

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ftplugin/python/vim_ipython.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,10 +330,11 @@ def get_doc_msg(msg_id):
330330
n = 13 # longest field name (empirically)
331331
b=[]
332332
try:
333-
content = get_child_msg(msg_id)['content']
333+
m = get_child_msg(msg_id)
334334
except Empty:
335335
# timeout occurred
336336
return ["no reply from IPython kernel"]
337+
content = m['content']
337338

338339
if 'evalue' in content:
339340
return b

0 commit comments

Comments
 (0)