diff options
Diffstat (limited to 'wsgitools/scgi')
-rw-r--r-- | wsgitools/scgi/__init__.py | 4 | ||||
-rw-r--r-- | wsgitools/scgi/forkpool.py | 4 |
2 files changed, 6 insertions, 2 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): diff --git a/wsgitools/scgi/forkpool.py b/wsgitools/scgi/forkpool.py index 1bf0c6f..7cc6d18 100644 --- a/wsgitools/scgi/forkpool.py +++ b/wsgitools/scgi/forkpool.py @@ -135,7 +135,7 @@ class SocketFileWrapper: def __iter__(self): """see pep333""" return self - def next(self): + def __next__(self): """ see pep333 @raise socket.error: @@ -144,6 +144,8 @@ class SocketFileWrapper: if not data: raise StopIteration return data + def next(self): + return self.__next__() def flush(self): """see pep333""" pass |