Check marker before accessing it

When pool is enabled, current code will return marker_name['next']
no matter if there is the key 'next' in it. Then user will run
into a KeyError issue. This fix will change it and keep it
consistent with the behaviour of no pool.

Closes-Bug: #1412608

Change-Id: Iea66f99482146c38615fccc3060ab56f7ff98d9e
This commit is contained in:
Fei Long Wang 2015-01-20 13:58:28 +13:00
parent 898ced1ec1
commit 2649062d80
1 changed files with 1 additions and 1 deletions

View File

@ -166,7 +166,7 @@ class QueueController(storage.Queue):
yield queue_cmp.obj
yield it()
yield marker_name['next']
yield marker_name and marker_name['next']
def _get(self, name, project=None):
try: