diff options
Diffstat (limited to 'wsgitools/filters.py')
-rw-r--r-- | wsgitools/filters.py | 2 |
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): |