diff options
author | Daniel G. Taylor <danielgtaylor@gmail.com> | 2014-06-20 14:47:20 -0700 |
---|---|---|
committer | Daniel G. Taylor <danielgtaylor@gmail.com> | 2014-06-27 15:57:24 -0700 |
commit | 96cd2800b6db067e503ef499486adf50ee9ca928 (patch) | |
tree | 82723b7a0c5b5ac07ea46a69166612efdb1f074f /boto/ecs | |
parent | 125c4ce8606c959bd4b9e432e96232f48ae49d74 (diff) | |
download | boto-96cd2800b6db067e503ef499486adf50ee9ca928.tar.gz |
Initial work to support Python 3.3+
This updates most of the code to be forward-compatible with Python 3.3 and
3.4 while still continuing to support 2.6 and 2.7. It **drops** support for
Python 2.5.
Python 3 support is added for common Boto modules (`boto/*.py`) as well as
S3, SQS, Kinesis and CloudTrail. Several other modules may work but have
not been thoroughly tested.
The `tox` configuration has been updated to run tests for all supported
environments, and for now a whitelist is used for Python 3 unit tests.
A new porting guide is included to help community members port other
modules to Python 3, and both the README and Sphinx index list which
modules currently support Python 3.
Diffstat (limited to 'boto/ecs')
-rw-r--r-- | boto/ecs/item.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/boto/ecs/item.py b/boto/ecs/item.py index 624088dc..5244fbea 100644 --- a/boto/ecs/item.py +++ b/boto/ecs/item.py @@ -23,6 +23,7 @@ import xml.sax import cgi from StringIO import StringIO +from boto.compat import six class ResponseGroup(xml.sax.ContentHandler): """A Generic "Response Group", which can @@ -141,14 +142,14 @@ class ItemSet(ResponseGroup): if self.iter is None: self.iter = iter(self.objs) try: - return self.iter.next() + return six.advance_iterator(self.iter) except StopIteration: self.iter = None self.objs = [] if int(self.page) < int(self.total_pages): self.page += 1 self._connection.get_response(self.action, self.params, self.page, self) - return self.next() + return six.advance_iterator(self) else: raise |