diff options
Diffstat (limited to 'paste/lint.py')
-rw-r--r-- | paste/lint.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/paste/lint.py b/paste/lint.py index 0eedfa2..fac8948 100644 --- a/paste/lint.py +++ b/paste/lint.py @@ -133,7 +133,7 @@ def middleware(application, global_conf=None): will be printed to stderr -- there's no way to throw an exception at that point). """ - + def lint_app(*args, **kw): assert len(args) == 2, "Two arguments required" assert not kw, "No keyword arguments allowed" @@ -200,7 +200,7 @@ class InputWrapper(object): for line in lines: assert type(line) is type("") return lines - + def __iter__(self): while 1: line = self.readline() @@ -270,7 +270,7 @@ class IteratorWrapper(object): return v __next__ = next - + def close(self): self.closed = True if hasattr(self.original_iterator, 'close'): @@ -287,7 +287,7 @@ def check_environ(environ): assert isinstance(environ,dict), ( "Environment is not of the right type: %r (environment: %r)" % (type(environ), environ)) - + for key in ['REQUEST_METHOD', 'SERVER_NAME', 'SERVER_PORT', 'wsgi.version', 'wsgi.input', 'wsgi.errors', 'wsgi.multithread', 'wsgi.multiprocess', @@ -314,7 +314,7 @@ def check_environ(environ): assert isinstance(environ[key], str), ( "Environmental variable %s is not a string: %r (value: %r)" % (key, type(environ[key]), environ[key])) - + assert isinstance(environ['wsgi.version'], tuple), ( "wsgi.version should be a tuple (%r)" % environ['wsgi.version']) assert environ['wsgi.url_scheme'] in ('http', 'https'), ( |