search the connection dict for a connection with the given credentials if it does not exist return None
(self, host, login, passwd, conn)
| 249 | self._event_loop.start() |
| 250 | |
| 251 | def _search_connection(self, host, login, passwd, conn): |
| 252 | """ |
| 253 | search the connection dict for a connection with the given credentials |
| 254 | if it does not exist return None |
| 255 | """ |
| 256 | self._connections_lock.acquireRead() |
| 257 | try: |
| 258 | if (host in self._connections): |
| 259 | connections = self._connections[host] |
| 260 | |
| 261 | for connection in connections: |
| 262 | if (connection.login == login and connection.passwd == passwd and connection.type == conn): |
| 263 | return connection |
| 264 | finally: |
| 265 | self._connections_lock.release() |
| 266 | |
| 267 | return None |
| 268 | |
| 269 | def get_connection(self, host, login, passwd, conn): |
| 270 | """ |
no test coverage detected