Index: PooledDB.py
===================================================================
--- PooledDB.py (revision 7263)
+++ PooledDB.py (working copy)
@@ -325,7 +325,7 @@
 
        def __del__(self):
                """Delete the pool."""
-               if hasattr(self, '_connections'):
+               if hasattr(self, '_connections') and self._connections > 0:
                        self.close()
