From: Michael Tremer Date: Fri, 26 Oct 2018 16:41:59 +0000 (+0100) Subject: web: base: Drop unused imports X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b22bc8e83110e7802e5f7646cfa3e9e1903418f8;p=ipfire.org.git web: base: Drop unused imports Signed-off-by: Michael Tremer --- diff --git a/src/web/__init__.py b/src/web/__init__.py index 96a97448..63c059cc 100644 --- a/src/web/__init__.py +++ b/src/web/__init__.py @@ -86,7 +86,7 @@ class Application(tornado.web.Application): }, # Call this when a page wasn't found - "default_handler_class" : NotFoundHandler, + "default_handler_class" : base.NotFoundHandler, } settings.update(kwargs) @@ -130,10 +130,10 @@ class Application(tornado.web.Application): (r"/(de|en)/(.*)", LangCompatHandler), # Export arbitrary error pages - (r"/error/([45][0-9]{2})", ErrorHandler), + (r"/error/([45][0-9]{2})", base.ErrorHandler), # Block page - (r"/blocked", BlockedHandler), + (r"/blocked", base.BlockedHandler), ]) # blog.ipfire.org diff --git a/src/web/handlers.py b/src/web/handlers.py index 2aacd358..47758256 100644 --- a/src/web/handlers.py +++ b/src/web/handlers.py @@ -1,20 +1,8 @@ #!/usr/bin/python -#import httplib import iso3166 -#import logging -#import markdown2 -import operator -import os -#import random -#import re -#import socket -#import time -#import tornado.database -#import tornado.locale import tornado.gen import tornado.web -#import unicodedata from . import base @@ -22,10 +10,8 @@ from .handlers_boot import * from .handlers_fireinfo import * from .handlers_iuse import * from .handlers_mirrors import * -from .handlers_nopaste import * -from .handlers_talk import * -class LangCompatHandler(BaseHandler): +class LangCompatHandler(base.BaseHandler): """ Redirect links in the old format to current site: @@ -35,7 +21,7 @@ class LangCompatHandler(BaseHandler): self.redirect("/%s" % page) -class IndexHandler(BaseHandler): +class IndexHandler(base.BaseHandler): """ This handler displays the welcome page. """ @@ -53,7 +39,7 @@ class IndexHandler(BaseHandler): latest_release=latest_release) -class DonateHandler(BaseHandler): +class DonateHandler(base.BaseHandler): def get(self): location = self.get_remote_location() @@ -134,7 +120,7 @@ class DonateHandler(BaseHandler): self.redirect(redirect_url) -class StaticHandler(BaseHandler): +class StaticHandler(base.BaseHandler): def initialize(self, template): self._template = template