summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-10-08 08:36:07 +0000
committerGerrit Code Review <review@openstack.org>2018-10-08 08:36:07 +0000
commite5e1cc439c659bf9051c51e872db87613b7b81ed (patch)
tree12972f9bec62143e56e7bb05f8107ca51910b551
parent2f402ff9eab381b14bd357b882be7db73f32bec9 (diff)
parentf537389811dcc5e0ec5ee02883f75a3baa34479e (diff)
Merge "Handle StopIteration for Py3.7 PEP 0479"
-rw-r--r--glance/tests/unit/api/test_common.py2
-rw-r--r--glance/tests/unit/common/test_utils.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/glance/tests/unit/api/test_common.py b/glance/tests/unit/api/test_common.py
index ab1ccb9..cf3c9f9 100644
--- a/glance/tests/unit/api/test_common.py
+++ b/glance/tests/unit/api/test_common.py
@@ -34,7 +34,7 @@ class SimpleIterator(object):
34 yield chunk 34 yield chunk
35 chunk = read_chunk() 35 chunk = read_chunk()
36 else: 36 else:
37 raise StopIteration() 37 return
38 38
39 39
40class TestSizeCheckedIter(testtools.TestCase): 40class TestSizeCheckedIter(testtools.TestCase):
diff --git a/glance/tests/unit/common/test_utils.py b/glance/tests/unit/common/test_utils.py
index 48911c6..98ff61c 100644
--- a/glance/tests/unit/common/test_utils.py
+++ b/glance/tests/unit/common/test_utils.py
@@ -87,7 +87,7 @@ class TestUtils(test_utils.BaseTestCase):
87 yield chunk 87 yield chunk
88 iteration += 1 88 iteration += 1
89 if iteration >= max_iterations: 89 if iteration >= max_iterations:
90 raise StopIteration() 90 return
91 91
92 def _test_reader_chunked(self, chunk_size, read_size, max_iterations=5): 92 def _test_reader_chunked(self, chunk_size, read_size, max_iterations=5):
93 generator = self._create_generator(chunk_size, max_iterations) 93 generator = self._create_generator(chunk_size, max_iterations)