Commit e80498ad authored by Stefan H. Holek's avatar Stefan H. Holek

Remove evil bare excepts around connection.close().

parent 9e96d4c6
...@@ -173,15 +173,13 @@ class ConnectionRegistry: ...@@ -173,15 +173,13 @@ class ConnectionRegistry:
self._conns.append(conn) self._conns.append(conn)
def close(self, conn): def close(self, conn):
try: self._conns.remove(conn) if self.contains(conn):
except: pass self._conns.remove(conn)
try: conn.close() conn.close()
except: pass
def closeAll(self): def closeAll(self):
for conn in self._conns: for conn in self._conns:
try: conn.close() conn.close()
except: pass
self._conns = [] self._conns = []
def __len__(self): def __len__(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment