From 11eb97bcd49be4c2461062733fb594a59927be2d Mon Sep 17 00:00:00 2001 From: Michael McGrath Date: Sun, 9 Mar 2008 14:21:41 -0500 Subject: [PATCH] getting closer, still needs some work --- fas/convert.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fas/convert.py b/fas/convert.py index 392655f..96b46b6 100644 --- a/fas/convert.py +++ b/fas/convert.py @@ -142,9 +142,11 @@ for role in c.fetchall(): session.flush() except ProgrammingError, e: print "\tERROR - The role %s -> %s could not be created - %s" % (person_id, project_group_id, e) + session.close() except IntegrityError, e: if e.message.find('dupilcate key'): print "\tERROR - The role %s -> %s already exists! Skipping" % (person_id, project_group_id) + session.close() continue print "\tERROR - The role %s -> %s could not be created - %s" % (person_id, project_group_id, e) session.close()