Add exception to except clause
This commit is contained in:
1 parent
5d25474b2f
commit
ccad89cea9
1 file changed
+1
-1
@@ -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]:
|
||||
|
||||
Reference in new issue
Block a user