Skip to content

Commit

Permalink
mgr/dashboard: pool: fix python3 dict_keys error
Browse files Browse the repository at this point in the history
Signed-off-by: Ricardo Dias <rdias@suse.com>
  • Loading branch information
rjfd committed Apr 25, 2018
1 parent e96475b commit 6ec4f9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pybind/mgr/dashboard/controllers/pool.py
Expand Up @@ -15,7 +15,7 @@ class Pool(RESTController):
@classmethod
def _serialize_pool(cls, pool, attrs):
if not attrs or not isinstance(attrs, list):
attrs = pool.keys()
attrs = list(pool.keys())

crush_rules = {r['rule_id']: r["rule_name"] for r in mgr.get('osd_map_crush')['rules']}

Expand All @@ -28,7 +28,7 @@ def _serialize_pool(cls, pool, attrs):
elif attr == 'crush_rule':
res[attr] = crush_rules[pool[attr]]
elif attr == 'application_metadata':
res[attr] = pool[attr].keys()
res[attr] = list(pool[attr].keys())
else:
res[attr] = pool[attr]

Expand Down

0 comments on commit 6ec4f9b

Please sign in to comment.