summaryrefslogtreecommitdiff
path: root/wsgitools/filters.py
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2011-07-24 22:43:26 +0200
committerHelmut Grohne <helmut@subdivi.de>2011-07-24 22:43:26 +0200
commitcc28226b4afcd1803c9790e8ba238e2125ce0129 (patch)
tree0a12bbadafd0f52fc0693c1d80753815c86b79b4 /wsgitools/filters.py
parent0c93b64584c7067d7a5f6876ded2a59ad021d3bc (diff)
downloadwsgitools-cc28226b4afcd1803c9790e8ba238e2125ce0129.tar.gz
add more assertions for types of passed parameters
Diffstat (limited to 'wsgitools/filters.py')
-rw-r--r--wsgitools/filters.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/wsgitools/filters.py b/wsgitools/filters.py
index 1c3fadc..e455cbe 100644
--- a/wsgitools/filters.py
+++ b/wsgitools/filters.py
@@ -238,6 +238,7 @@ class RequestLogWSGIFilter(BaseWSGIFilter):
"""
BaseWSGIFilter.__init__(self)
assert hasattr(log, "write")
+ assert hasattr(log, "flush") or not flush
self.log = log
self.flush = flush
self.remote = "?"
@@ -279,6 +280,7 @@ class RequestLogWSGIFilter(BaseWSGIFilter):
@type data: str
@rtype: str
"""
+ assert isinstance(data, str)
self.length += len(data)
return data
def handle_close(self):