| Index: sitescripts/web.py |
| =================================================================== |
| --- a/sitescripts/web.py |
| +++ b/sitescripts/web.py |
| @@ -11,16 +11,17 @@ |
| # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| # GNU General Public License for more details. |
| # |
| # You should have received a copy of the GNU General Public License |
| # along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
| import base64 |
| +import importlib |
| from sitescripts.utils import get_config |
| handlers = {} |
| authenticated_users = {} |
| def url_handler(url): |
| def decorator(func): |
| registerUrlHandler(url, func) |
| @@ -51,18 +52,10 @@ def authenticate(f, environ, start_respo |
| if username == expected_username and password == expected_password: |
| return f(environ, start_response) |
| realm = get_config().get("DEFAULT", "basic_auth_realm") |
| start_response("401 UNAUTHORIZED", |
| [("WWW-Authenticate", 'Basic realm="%s"' % realm)]) |
| return "" |
| -import subscriptions.web.fallback |
| -import crashes.web.submitCrash |
| -import reports.web.submitReport |
| -import reports.web.updateReport |
| -import reports.web.showDigest |
| -import reports.web.showUser |
| -import formmail.web.formmail |
| -import crawler.web.crawler |
| -import urlfixer.web.submitData |
| -import extensions.web.downloads |
| +for module in set(get_config().options("multiplexer")) - set(get_config().defaults()): |
| + importlib.import_module(module) |