Small code clean ups
parent
7e45b2611d
commit
4ce3c7cb32
|
@ -108,7 +108,6 @@ morss will auto-detect what "mode" to use.
|
|||
For this, you'll want to change a bit the architecture of the files, for example
|
||||
into something like this.
|
||||
|
||||
|
||||
```
|
||||
/
|
||||
├── cgi
|
||||
|
|
|
@ -72,7 +72,6 @@ def custom_handler(follow=None, delay=None, encoding=None):
|
|||
handlers.append(HTTPRefreshHandler())
|
||||
handlers.append(UAHandler(DEFAULT_UA))
|
||||
handlers.append(BrowserlyHeaderHandler())
|
||||
|
||||
handlers.append(EncodingFixHandler(encoding))
|
||||
|
||||
if follow:
|
||||
|
|
|
@ -85,7 +85,7 @@ def parse(data, url=None, mimetype=None, encoding=None):
|
|||
for path in ruleset['path']:
|
||||
if fnmatch(url, path):
|
||||
parser = [x for x in parsers if x.mode == ruleset['mode']][0]
|
||||
return parser(data, ruleset, encoding=encoding)
|
||||
return parser(data, ruleset, encoding=encoding)
|
||||
|
||||
# 2) Try each and every parser
|
||||
|
||||
|
|
|
@ -550,7 +550,7 @@ def cgi_app(environ, start_response):
|
|||
|
||||
def middleware(func):
|
||||
" Decorator to turn a function into a wsgi middleware "
|
||||
# This is called when parsing the code
|
||||
# This is called when parsing the "@middleware" code
|
||||
|
||||
def app_builder(app):
|
||||
# This is called when doing app = cgi_wrapper(app)
|
||||
|
|
Loading…
Reference in New Issue