FIX TypeError for list queue command.
Scenario: pooling is enabled but no pool present in the env. Zaqar list queues command through a type error with a response code 500. Change-Id: I3b008b83e8fb1c85a5d7e21c7aad83e66a5ffa89 Closes-Bug: #1502042
This commit is contained in:
parent
9635ef09c0
commit
a2ae8eb3d8
@ -155,12 +155,13 @@ class QueueController(storage.Queue):
|
||||
cursor = self._pool_catalog._pools_ctrl.list(limit=0)
|
||||
pools_list = list(next(cursor))
|
||||
anypool = pools_list and pools_list[0]
|
||||
yield next(self._pool_catalog.get_driver(anypool['name'])
|
||||
.queue_controller.list(
|
||||
project=project,
|
||||
marker=marker,
|
||||
limit=limit,
|
||||
detailed=detailed))
|
||||
if anypool:
|
||||
yield next(self._pool_catalog.get_driver(anypool['name'])
|
||||
.queue_controller.list(
|
||||
project=project,
|
||||
marker=marker,
|
||||
limit=limit,
|
||||
detailed=detailed))
|
||||
|
||||
# make a heap compared with 'name'
|
||||
ls = heapq.merge(*[
|
||||
|
Loading…
x
Reference in New Issue
Block a user