Correction : /etc/sv/openerp7_burette/run : ne requiert pas HTTP_OPENERP_DB_FILTER .
authorJulien Moutinho <julm+heureux-cyclage@autogeree.net>
Fri, 6 Dec 2013 10:13:12 +0000 (11:13 +0100)
committerroot <root@ateliers.heureux-cyclage.org>
Fri, 6 Dec 2013 10:13:12 +0000 (11:13 +0100)
etc/sv/openerp7_burette/run

index 822c081..bde5ee4 100755 (executable)
@@ -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 \