| OLD | NEW |
| 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-present eyeo GmbH | 2 # Copyright (C) 2006-present 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 |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 try: | 120 try: |
| 121 handler = handlers[path] | 121 handler = handlers[path] |
| 122 except KeyError: | 122 except KeyError: |
| 123 handler = handlers[re.sub(r'[^/]+$', '', path)] | 123 handler = handlers[re.sub(r'[^/]+$', '', path)] |
| 124 except KeyError: | 124 except KeyError: |
| 125 start_response('404 Not Found', [('Content-Type', 'text/plain')]) | 125 start_response('404 Not Found', [('Content-Type', 'text/plain')]) |
| 126 return ['Not Found'] | 126 return ['Not Found'] |
| 127 | 127 |
| 128 return handler(environ, start_response) | 128 return handler(environ, start_response) |
| 129 | 129 |
| 130 |
| 130 for module in set(get_config().options('multiplexer')) - set(get_config().defaul
ts()): | 131 for module in set(get_config().options('multiplexer')) - set(get_config().defaul
ts()): |
| 131 module_path = get_config().get('multiplexer', module) | 132 module_path = get_config().get('multiplexer', module) |
| 132 if module_path: | 133 if module_path: |
| 133 imp.load_source(module, module_path) | 134 imp.load_source(module, module_path) |
| 134 else: | 135 else: |
| 135 importlib.import_module(module) | 136 importlib.import_module(module) |
| OLD | NEW |