Commits

mlk  committed b0892bd

remove AppIterRange.app_iterator, just use self.app_iter = iter(app_iter)

  • Participants
  • Parent commits 4301a36

Comments (0)

Files changed (2)

File webob/__init__.py

         assert start >= 0, "Bad start: %r" % start
         assert stop is None or (stop >= 0 and stop >= start), (
             "Bad stop: %r" % stop)
-        self.app_iter = app_iter
-        self.app_iterator = iter(app_iter)
-        self._pos = 0 # position in app_iterator
+        self.app_iter = iter(app_iter)
+        self._pos = 0 # position in app_iter
         self.start = start
         self.stop = stop
 
 
     def _skip_start(self):
         start, stop = self.start, self.stop
-        for chunk in self.app_iterator:
+        for chunk in self.app_iter:
             self._pos += len(chunk)
             if self._pos < start:
                 continue
         if stop is not None and self._pos >= stop:
             raise StopIteration
 
-        chunk = self.app_iterator.next()
+        chunk = self.app_iter.next()
         self._pos += len(chunk)
 
         if stop is None or self._pos <= stop:
 
 
 class EmptyResponse(object):
-
     """An empty WSGI response.
 
     An iterator that immediately stops. Optionally provides a close

File webob/statusreasons.py

     505: 'HTTP Version Not Supported',
     507: 'Insufficient Storage',
     510: 'Not Extended',
-    }
+}