Add exception to except clause

This commit is contained in:
Nicolas Évrard committed 2011-10-28 10:18:58 +02:00
1 parent 5d25474b2f
commit ccad89cea9
1 file changed
+1 -1
+1 -1
View File
@@ -1117,7 +1117,7 @@ class ModelSQL(ModelStorage):
try:
cursor.execute('DELETE FROM "'+self._table+'" ' \
'WHERE ' + red_sql, red_ids)
except DatabaseIntegrityError:
except DatabaseIntegrityError, exception:
with Transaction().new_cursor():
for name, _, error in self._sql_constraints:
if name in exception[0]: