Fixing OMF API not being remove on delete from _apis dict in omf_api_factory
[nepi.git] / src / nepi / resources / omf / omf_api_factory.py
index a8fbaac..7771dcc 100644 (file)
@@ -125,7 +125,7 @@ class OMFAPIFactory(object):
                 if cls._apis[key]['cnt'] == 0:
                     omf_api = cls._apis[key]['api']
                     omf_api.disconnect()
-
+                    del cls._apis[key]
 
     @classmethod 
     def _make_key(cls, *args):