diff options
author | Zane Bitter <zbitter@redhat.com> | 2018-10-23 13:32:28 -0400 |
---|---|---|
committer | Zane Bitter <zbitter@redhat.com> | 2018-10-23 13:32:28 -0400 |
commit | 10e5c641ecd45d896d25b0511438c9a9ce3c59e4 (patch) | |
tree | 8f5aefb72b21d6d0ee52bcc5ce218fe7186a936d /paste/httpserver.py | |
parent | 777b6cd5b6b2159d32461846f53617fc7cb962be (diff) | |
download | paste-git-10e5c641ecd45d896d25b0511438c9a9ce3c59e4.tar.gz |
Make iterators Python3-compatible
In Python3, the iterator protocol uses a method named __next__(), not
next(). (For compatibility with Python 2.6, we still need to support
both though.) Ensure all iterator objects support the Python3 protocol.
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Diffstat (limited to 'paste/httpserver.py')
-rwxr-xr-x | paste/httpserver.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/paste/httpserver.py b/paste/httpserver.py index 11489b0..8bacfbc 100755 --- a/paste/httpserver.py +++ b/paste/httpserver.py @@ -513,6 +513,7 @@ class LimitedLengthFile(object): if self.length - self._consumed <= 0: raise StopIteration return self.readline() + __next__ = next ## Optional methods ## |