LEFT | RIGHT |
1 # This file is part of the Adblock Plus web scripts, | 1 # This file is part of the Adblock Plus web scripts, |
2 # Copyright (C) 2006-2017 eyeo GmbH | 2 # Copyright (C) 2006-2017 eyeo GmbH |
3 # | 3 # |
4 # Adblock Plus is free software: you can redistribute it and/or modify | 4 # Adblock Plus is free software: you can redistribute it and/or modify |
5 # it under the terms of the GNU General Public License version 3 as | 5 # it under the terms of the GNU General Public License version 3 as |
6 # published by the Free Software Foundation. | 6 # published by the Free Software Foundation. |
7 # | 7 # |
8 # Adblock Plus is distributed in the hope that it will be useful, | 8 # Adblock Plus is distributed in the hope that it will be useful, |
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 # GNU General Public License for more details. | 11 # GNU General Public License for more details. |
12 # | 12 # |
13 # You should have received a copy of the GNU General Public License | 13 # You should have received a copy of the GNU General Public License |
14 # along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. | 14 # along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
| 15 |
15 from __future__ import print_function | 16 from __future__ import print_function |
16 | 17 |
17 import os | 18 import os |
18 import sys | 19 import sys |
19 import datetime | 20 import datetime |
20 import traceback | 21 import traceback |
21 import collections | 22 import collections |
22 from csv import DictWriter, DictReader | 23 from csv import DictWriter, DictReader |
23 | 24 |
24 import jinja2 | 25 import jinja2 |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 start_response('200 OK', response_headers) | 162 start_response('200 OK', response_headers) |
162 return '' | 163 return '' |
163 | 164 |
164 return url, handler | 165 return url, handler |
165 | 166 |
166 | 167 |
167 conf_dict = conf_parse(get_config_items()) | 168 conf_dict = conf_parse(get_config_items()) |
168 for name, config in conf_dict.items(): | 169 for name, config in conf_dict.items(): |
169 url, handler = make_handler(name, config) | 170 url, handler = make_handler(name, config) |
170 registerUrlHandler(url, handler) | 171 registerUrlHandler(url, handler) |
LEFT | RIGHT |