getting closer, still needs some work

This commit is contained in:
Michael McGrath 2008-03-09 14:21:41 -05:00
parent 958a530c33
commit 11eb97bcd4

View file

@ -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()