diff options
author | Cyril Roelandt <cyril.roelandt@enovance.com> | 2014-03-18 12:10:58 +0100 |
---|---|---|
committer | Cyril Roelandt <cyril.roelandt@enovance.com> | 2014-03-18 12:10:58 +0100 |
commit | 72a55a49df4038f1633c68bef8f3d7c641b9b69b (patch) | |
tree | 777382fe4f7aaa5c14c934d5b3ab43fb440f49bb | |
parent | 7faf0fb2f6c4eaa7b212b71c070edb857d8f20bf (diff) | |
download | paste-git-72a55a49df4038f1633c68bef8f3d7c641b9b69b.tar.gz |
Python 3: Replace iterator.next() with six.next(iterator)
-rw-r--r-- | paste/evalexception/middleware.py | 3 | ||||
-rw-r--r-- | paste/lint.py | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/paste/evalexception/middleware.py b/paste/evalexception/middleware.py index cee9147..b6345c5 100644 --- a/paste/evalexception/middleware.py +++ b/paste/evalexception/middleware.py @@ -31,6 +31,7 @@ import sys import os import cgi import traceback +import six from six.moves import cStringIO as StringIO import pprint import itertools @@ -162,7 +163,7 @@ def get_debug_count(environ): if 'paste.evalexception.debug_count' in environ: return environ['paste.evalexception.debug_count'] else: - environ['paste.evalexception.debug_count'] = next = debug_counter.next() + environ['paste.evalexception.debug_count'] = next = six.next(debug_counter) return next class EvalException(object): diff --git a/paste/lint.py b/paste/lint.py index 5505663..5eaec9a 100644 --- a/paste/lint.py +++ b/paste/lint.py @@ -110,6 +110,7 @@ Some of the things this checks: """ import re +import six import sys from types import DictType, StringType, TupleType, ListType import warnings @@ -262,7 +263,7 @@ class IteratorWrapper(object): def next(self): assert not self.closed, ( "Iterator read after closed") - v = self.iterator.next() + v = six.next(self.iterator) if self.check_start_response is not None: assert self.check_start_response, ( "The application returns and we started iterating over its body, but start_response has not yet been called") |