From: Michael Orlitzky Date: Sat, 15 May 2010 19:24:53 +0000 (-0400) Subject: Place the call to connection.close() within a try/except block. X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Fcensus-tools.git;a=commitdiff_plain;h=3ab8463a642a3540da604d266d57a6d5af7485cc Place the call to connection.close() within a try/except block. --- diff --git a/src/Census.py b/src/Census.py index 1b20312..b72da0c 100644 --- a/src/Census.py +++ b/src/Census.py @@ -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):