Merge "Fit the StopIteration for py37"
This commit is contained in:
commit
a3a2ac338a
@ -112,7 +112,7 @@
|
|||||||
- check-requirements
|
- check-requirements
|
||||||
- openstack-lower-constraints-jobs
|
- openstack-lower-constraints-jobs
|
||||||
- openstack-python-jobs
|
- openstack-python-jobs
|
||||||
- openstack-python36-jobs
|
- openstack-python3-train-jobs
|
||||||
- periodic-stable-jobs
|
- periodic-stable-jobs
|
||||||
- publish-openstack-docs-pti
|
- publish-openstack-docs-pti
|
||||||
- release-notes-jobs-python3
|
- release-notes-jobs-python3
|
||||||
|
@ -15,7 +15,9 @@ classifier =
|
|||||||
Programming Language :: Python
|
Programming Language :: Python
|
||||||
Programming Language :: Python :: 2
|
Programming Language :: Python :: 2
|
||||||
Programming Language :: Python :: 2.7
|
Programming Language :: Python :: 2.7
|
||||||
|
Programming Language :: Python :: 3
|
||||||
Programming Language :: Python :: 3.6
|
Programming Language :: Python :: 3.6
|
||||||
|
Programming Language :: Python :: 3.7
|
||||||
|
|
||||||
[files]
|
[files]
|
||||||
packages =
|
packages =
|
||||||
|
2
tox.ini
2
tox.ini
@ -1,6 +1,6 @@
|
|||||||
[tox]
|
[tox]
|
||||||
minversion = 2.0
|
minversion = 2.0
|
||||||
envlist = py36,py27,pep8
|
envlist = py27,py37,pep8
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
|
@ -38,15 +38,18 @@ LOG = logging.getLogger(__name__)
|
|||||||
def _messages_iter(msg_iter):
|
def _messages_iter(msg_iter):
|
||||||
"""Used to iterate through messages."""
|
"""Used to iterate through messages."""
|
||||||
|
|
||||||
msg = next(msg_iter)
|
try:
|
||||||
yield msg.pop('claim')
|
msg = next(msg_iter)
|
||||||
yield msg
|
yield msg.pop('claim')
|
||||||
|
|
||||||
# Smoke it!
|
|
||||||
for msg in msg_iter:
|
|
||||||
del msg['claim']
|
|
||||||
yield msg
|
yield msg
|
||||||
|
|
||||||
|
# Smoke it!
|
||||||
|
for msg in msg_iter:
|
||||||
|
del msg['claim']
|
||||||
|
yield msg
|
||||||
|
except StopIteration:
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
class ClaimController(storage.Claim):
|
class ClaimController(storage.Claim):
|
||||||
"""Implements claim resource operations using MongoDB.
|
"""Implements claim resource operations using MongoDB.
|
||||||
|
Loading…
Reference in New Issue
Block a user