summaryrefslogtreecommitdiff
path: root/wsgitools/scgi/__init__.py
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2012-06-28 17:23:06 +0200
committerHelmut Grohne <helmut@subdivi.de>2012-06-28 17:23:06 +0200
commit53c7d892904c9f133d55f052a27dafd3911d0c5c (patch)
treec3452c5436bae1e327cf375abcce5c5524a853d8 /wsgitools/scgi/__init__.py
parentfd38036b9f1693f8f368851d40928bc5922ce606 (diff)
downloadwsgitools-53c7d892904c9f133d55f052a27dafd3911d0c5c.tar.gz
provide py3 style __next__ methods
Diffstat (limited to 'wsgitools/scgi/__init__.py')
-rw-r--r--wsgitools/scgi/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/wsgitools/scgi/__init__.py b/wsgitools/scgi/__init__.py
index cbe7a80..4e60b74 100644
--- a/wsgitools/scgi/__init__.py
+++ b/wsgitools/scgi/__init__.py
@@ -45,13 +45,15 @@ class FileWrapper:
def __iter__(self):
return self
- def next(self):
+ def __next__(self):
assert self.offset <= 0
self.offset = -1
data = self.filelike.read(self.blksize)
if data:
return data
raise StopIteration
+ def next(self):
+ return self.__next__()
def _convert_environ(environ, multithread=False, multiprocess=False,
run_once=False):