summaryrefslogtreecommitdiff
path: root/django/http/multipartparser.py
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2012-05-10 20:14:04 +0200
committerClaude Paroz <claude@2xlibre.net>2012-05-10 20:15:49 +0200
commit169b1a404c8118bb75840523d5fb3543de9c8889 (patch)
tree7d894e0ade3cb2fc7b8a6d33344bc3ac479a83c7 /django/http/multipartparser.py
parent1c1a22963236c6015724bfbf43dd56dbe40a6cf9 (diff)
downloaddjango-169b1a404c8118bb75840523d5fb3543de9c8889.tar.gz
Replaced foo.next() by next(foo).
This new syntax for next() has been introduced in Python 2.6 and is compatible with Python 3.
Diffstat (limited to 'django/http/multipartparser.py')
-rw-r--r--django/http/multipartparser.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/django/http/multipartparser.py b/django/http/multipartparser.py
index 024e11a09c..d09c8fba86 100644
--- a/django/http/multipartparser.py
+++ b/django/http/multipartparser.py
@@ -291,7 +291,7 @@ class LazyStream(object):
while remaining != 0:
assert remaining > 0, 'remaining bytes to read should never go negative'
- chunk = self.next()
+ chunk = next(self)
emitting = chunk[:remaining]
self.unget(chunk[remaining:])
@@ -313,7 +313,7 @@ class LazyStream(object):
output = self._leftover
self._leftover = ''
else:
- output = self._producer.next()
+ output = next(self._producer)
self._unget_history = []
self.position += len(output)
return output
@@ -410,7 +410,7 @@ class BoundaryIter(object):
before the boundary, throw away the boundary bytes themselves, and push the
post-boundary bytes back on the stream.
- The future calls to .next() after locating the boundary will raise a
+ The future calls to next() after locating the boundary will raise a
StopIteration exception.
"""