[Checkins] SVN: zope.app.wsgi/trunk/src/zope/app/wsgi/ pep8/pyflakes
Jan-Jaap Driessen
jdriessen at thehealthagency.com
Fri Nov 12 09:11:46 EST 2010
Log message for revision 118365:
pep8/pyflakes
Changed:
U zope.app.wsgi/trunk/src/zope/app/wsgi/fileresult.py
U zope.app.wsgi/trunk/src/zope/app/wsgi/interfaces.py
U zope.app.wsgi/trunk/src/zope/app/wsgi/paste.py
-=-
Modified: zope.app.wsgi/trunk/src/zope/app/wsgi/fileresult.py
===================================================================
--- zope.app.wsgi/trunk/src/zope/app/wsgi/fileresult.py 2010-11-12 14:11:24 UTC (rev 118364)
+++ zope.app.wsgi/trunk/src/zope/app/wsgi/fileresult.py 2010-11-12 14:11:46 UTC (rev 118365)
@@ -23,6 +23,7 @@
from zope.publisher.interfaces.http import IResult
from zope.security.proxy import removeSecurityProxy
+
class FallbackWrapper:
interface.implements(IResult)
@@ -39,6 +40,7 @@
else:
break
+
@component.adapter(file, zope.publisher.interfaces.http.IHTTPRequest)
@interface.implementer(zope.publisher.http.IResult)
def FileResult(f, request):
@@ -48,7 +50,7 @@
size = f.tell()
f.seek(0)
request.response.setHeader('Content-Length', str(size))
-
+
wrapper = request.environment.get('wsgi.file_wrapper')
if wrapper is not None:
f = wrapper(f)
@@ -68,6 +70,7 @@
class _tfile:
pass
+
@component.adapter(_tfile, zope.publisher.interfaces.http.IHTTPRequest)
@interface.implementer(zope.publisher.http.IResult)
def TemporaryFileResult(f, request):
Modified: zope.app.wsgi/trunk/src/zope/app/wsgi/interfaces.py
===================================================================
--- zope.app.wsgi/trunk/src/zope/app/wsgi/interfaces.py 2010-11-12 14:11:24 UTC (rev 118364)
+++ zope.app.wsgi/trunk/src/zope/app/wsgi/interfaces.py 2010-11-12 14:11:46 UTC (rev 118365)
@@ -13,7 +13,7 @@
##############################################################################
"""WSGI-specific and compatible interfaces
-See PEP-0333 for details.
+See PEP-0333 for details.
$Id$
"""
@@ -42,6 +42,7 @@
``start_response()`` callable to begin the response.
"""
+
class IWSGIApplication(zope.interface.Interface):
"""A WSGI application."""
Modified: zope.app.wsgi/trunk/src/zope/app/wsgi/paste.py
===================================================================
--- zope.app.wsgi/trunk/src/zope/app/wsgi/paste.py 2010-11-12 14:11:24 UTC (rev 118364)
+++ zope.app.wsgi/trunk/src/zope/app/wsgi/paste.py 2010-11-12 14:11:46 UTC (rev 118365)
@@ -17,6 +17,7 @@
"""
from zope.app.wsgi import getWSGIApplication
+
def asbool(obj):
if isinstance(obj, basestring):
obj = obj.lower()
@@ -26,6 +27,7 @@
return False
return bool(obj)
+
def ZopeApplication(global_config, config_file, handle_errors=True, **options):
handle_errors = asbool(handle_errors)
return getWSGIApplication(config_file, handle_errors=handle_errors)
More information about the checkins
mailing list