Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubicweb
Commits
e150ed316dfc
Commit
2334a7f3
authored
Dec 18, 2019
by
Nicolas Chauvat
Browse files
[server.source.native] exceptions should never pass silently
parent
fceae84a22dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
cubicweb/server/sources/native.py
View file @
e150ed31
...
...
@@ -717,8 +717,9 @@ class NativeSQLSource(SQLAdapterMixIn, AbstractSource):
query_debug_informations
[
"rollback"
]
=
True
if
self
.
repo
.
config
.
mode
!=
'test'
:
self
.
debug
(
'transaction has been rolled back'
)
except
Exception
:
pass
except
Exception
as
rollback_exc
:
self
.
warning
(
'exception raised and ignored during rollback %s:
\n
%s'
,
rollback_exc
,
traceback
.
format_exc
(
limit
=
2
))
if
any
(
cls
.
__name__
for
cls
in
ex
.
__class__
.
__mro__
if
cls
.
__name__
==
'IntegrityError'
):
# need string comparison because of various backends
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment