[FIX] tools: find_in_path: config is not ready at import time
authorSimon Lejeune <sle@openerp.com>
Sun, 23 Nov 2014 14:01:52 +0000 (15:01 +0100)
committerSimon Lejeune <sle@openerp.com>
Sun, 23 Nov 2014 14:22:02 +0000 (15:22 +0100)
commit467968b79a713d10f53b387d911dcdd6ef10ce11
treebebe4722ce0b76100cd25bc36bde42ea4e43ed55
parent4617f665b97d267220e8f1de7f3adcd71a4220c0
[FIX] tools: find_in_path: config is not ready at import time

commit f76d4525a was not actually working: extra keys from
config files are not yet into the config options dict at
import time. The fix is to move the logic inside the method,
like in `find_pg_tool` just below.

Also fix the use of `find_in_path` in report.py: the subprocess
may also raise AttributeError exception, so instead of listing
all the possible ones just re-raise the IOError shallowed by
`find_in_path` when the result is None.

Fixes #3809 #3811
addons/report/models/report.py
openerp/tools/misc.py