Skip to content

Commit 15773a0

Browse files
committed
Clean up open file descriptors
1 parent 0c32d06 commit 15773a0

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

ftplugin/python/vim_ipython.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,6 @@ def km_from_string(s=''):
173173
continue
174174
attempt += 1
175175

176-
km = KernelManager(connection_file=fullpath)
177-
km.load_connection_file()
178-
179-
kc = km.client()
180-
kc.start_channels()
181-
182176
if 'connection_file' in KernelManager.class_trait_names():
183177
# 0.12 uses files instead of a collection of ports
184178
# include default IPython search path
@@ -244,6 +238,7 @@ def send(msg, **kwargs):
244238
connected = True
245239
except:
246240
echo("IPython connection attempt #%d failed - no messages" % attempt, "Warning")
241+
kc.stop_channels()
247242
continue
248243

249244
#XXX: backwards compatibility for IPython < 1.0

0 commit comments

Comments
 (0)