]> gitweb.michael.orlitzky.com - dead/census-tools.git/commitdiff
Place the call to connection.close() within a try/except block.
authorMichael Orlitzky <michael@orlitzky.com>
Sat, 15 May 2010 19:24:53 +0000 (15:24 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Sat, 15 May 2010 19:24:53 +0000 (15:24 -0400)
src/Census.py

index 1b203124916535ae424cc35a1a714dea4de34d27..b72da0cbd7133e66f9fb9f5c63b7c641fc58180a 100644 (file)
@@ -25,7 +25,10 @@ class Database:
 
 
     def __del__(self):
-        self.connection.close()
+        try:
+            self.connection.close()
+        except:
+            pass
 
 
     def find_average_population_density(self, coords):