Merge lp:~openerp-community/openobject-server/stefan-therp_lp879872-6.1 into lp:openobject-server
Proposed by
Stefan Rijnhart (Opener)
Status: | Work in progress | ||||
---|---|---|---|---|---|
Proposed branch: | lp:~openerp-community/openobject-server/stefan-therp_lp879872-6.1 | ||||
Merge into: | lp:openobject-server | ||||
Diff against target: |
50 lines (+9/-10) 2 files modified
openerp/service/web_services.py (+8/-8) openerp/tools/misc.py (+1/-2) |
||||
To merge this branch: | bzr merge lp:~openerp-community/openobject-server/stefan-therp_lp879872-6.1 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Olivier Dony (Odoo) | Needs Information | ||
Review via email: mp+80125@code.launchpad.net |
Description of the change
This branch slightly modifies the code around the pg_restore command, so that any error condition is properly signalled.
To post a comment you must log in.
Unmerged revisions
- 3774. By Stefan Rijnhart (Opener)
-
[FIX] adapted other call to exec_pg_
command_ pipe() to modified return value - 3773. By Stefan Rijnhart (Opener)
-
[FIX] check proper return value of pg_restore
Hi Stefan,
The documentation[1] mentions a warning about the use of Popen.wait() in conjunction with the subprocess writing large amount of data to the pipes, and suggests Popen.communicate() as an alternative. We seem to be fully reading the pipes before wait() is called, so I imagine it might be safe, but wouldn't Popen.communicate() be a better match for our use case?
Also, have you by happenstance tested this code on Windows, to make sure the return codes are identical and reliable on all platforms?
Thanks!
[1] http:// docs.python. org/library/ subprocess. html#subprocess .Popen. wait