From: Julien Moutinho Date: Fri, 6 Dec 2013 10:13:12 +0000 (+0100) Subject: Correction : /etc/sv/openerp7_burette/run : ne requiert pas HTTP_OPENERP_DB_FILTER . X-Git-Url: https://git.cyclocoop.org/?p=lhc%2Fateliers.git;a=commitdiff_plain;h=45964cf455e18065d4575b60516fab0037bc5d8f Correction : /etc/sv/openerp7_burette/run : ne requiert pas HTTP_OPENERP_DB_FILTER . --- diff --git a/etc/sv/openerp7_burette/run b/etc/sv/openerp7_burette/run index 822c081..bde5ee4 100755 --- a/etc/sv/openerp7_burette/run +++ b/etc/sv/openerp7_burette/run @@ -12,15 +12,17 @@ export LOGNAME="$sv" /usr/bin/patch --forward --reject-file=- --strip=0 --unified <<-EOF --- /usr/share/pyshared/openerp/addons/web/controllers/main.py 2013-12-01 05:06:50.121954391 +0100 +++ /usr/share/pyshared/openerp/addons/web/controllers/main.py 2013-12-01 05:07:44.917954389 +0100 - @@ -90,6 +90,8 @@ + @@ -90,6 +90,11 @@ h = req.httprequest.environ['HTTP_HOST'].split(':')[0] d = h.split('.')[0] r = openerp.tools.config['dbfilter'].replace('%h', h).replace('%d', d) - + f = req.httprequest.environ['HTTP_OPENERP_DB_FILTER'] - + r = r.replace('%f', f) + + try: + + f = req.httprequest.environ['HTTP_OPENERP_DB_FILTER'] or '' + + r = r.replace('%f', f) + + except KeyError: + + pass dbs = [i for i in dbs if re.match(r, i)] return dbs - EOF for db in \