def __init__(self, no_current_msg='No open connection'): self.current = self._no_current = _NoConnection(no_current_msg) self.current_index = None self._connections = [] self._aliases = NormalizedDict() self._no_current_msg = no_current_msg return
def empty_cache(self): """Empties the connections cache. Indexes of new connections starts from 1 after this.""" self.current = self._no_current self.current_index = None self._connections = [] self._aliases = NormalizedDict()