[Zope-Checkins] SVN: Zope/trunk/lib/python/Testing/ZopeTestCase/utils.py Remove evil bare excepts around connection.close().

Stefan H. Holek stefan at epy.co.at
Thu May 5 05:29:54 EDT 2005


Log message for revision 30244:
  Remove evil bare excepts around connection.close().
  

Changed:
  U   Zope/trunk/lib/python/Testing/ZopeTestCase/utils.py

-=-
Modified: Zope/trunk/lib/python/Testing/ZopeTestCase/utils.py
===================================================================
--- Zope/trunk/lib/python/Testing/ZopeTestCase/utils.py	2005-05-05 08:14:05 UTC (rev 30243)
+++ Zope/trunk/lib/python/Testing/ZopeTestCase/utils.py	2005-05-05 09:29:53 UTC (rev 30244)
@@ -173,15 +173,13 @@
         self._conns.append(conn)
 
     def close(self, conn):
-        try: self._conns.remove(conn)
-        except: pass
-        try: conn.close()
-        except: pass
+        if self.contains(conn):
+            self._conns.remove(conn)
+        conn.close()
 
     def closeAll(self):
         for conn in self._conns:
-            try: conn.close()
-            except: pass
+            conn.close()
         self._conns = []
 
     def __len__(self):



More information about the Zope-Checkins mailing list