/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 \