From 3ab8463a642a3540da604d266d57a6d5af7485cc Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sat, 15 May 2010 15:24:53 -0400 Subject: [PATCH] Place the call to connection.close() within a try/except block. --- src/Census.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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): -- 2.43.2