Merge lp:~savoirfairelinux-openerp/openupgrade-server/OperationalError into lp:openupgrade-server
Status: | Merged |
---|---|
Merged at revision: | 4637 |
Proposed branch: | lp:~savoirfairelinux-openerp/openupgrade-server/OperationalError |
Merge into: | lp:openupgrade-server |
Diff against target: |
11 lines (+0/-1) 1 file modified
openerp/modules/loading.py (+0/-1) |
To merge this branch: | bzr merge lp:~savoirfairelinux-openerp/openupgrade-server/OperationalError |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Holger Brunn (Therp) | code review | Approve | |
Stefan Rijnhart (Opener) | Approve | ||
Sylvain LE GAL (GRAP) | code review, no test | Approve | |
Review via email: mp+192740@code.launchpad.net |
Description of the change
Fixes a secondary exception when post-scripts generate an exception.
I found this to be due to openupgrade calling cr.close(), then raising the exception where OpenERP would attempt to close it again.
This generates a lot of useless exceptions which clutters the output and makes it hard to debug the proper errors.
Example:
2013-10-25 19:31:04,263 12738 ERROR upgrade openerp.
:
2013-10-25 19:31:04,267 12738 ERROR upgrade openerp: Failed to initialize database `upgrade`.
Traceback (most recent call last):
File "parts/
db, registry = openerp.
File "parts/
registry = RegistryManager
File "parts/
update_module)
File "parts/
openerp.
File "parts/
cr.close()
File "parts/
raise psycopg2.
OperationalError: Unable to use a closed cursor.
LGTM. Thanks !