]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/mgr_module: do not offer empty default value for choose_args 20258/head
authorKefu Chai <kchai@redhat.com>
Fri, 2 Feb 2018 08:25:26 +0000 (16:25 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 3 Feb 2018 17:15:56 +0000 (01:15 +0800)
as it should be always available. this also silence a pep8 warning.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/pybind/mgr/mgr_module.py

index 1e36c27ffa327887f9d3ad4d40e36d6cae86b313..2211df8037b76fd33eb26df64e1d751ddbb8e6ab 100644 (file)
@@ -149,7 +149,7 @@ class CRUSHMap(ceph_module.BasePyCRUSH):
 
     @staticmethod
     def get_default_choose_args(dump):
-        return dump.get('choose_args', {}).get(CRUSHMap.DEFAULT_CHOOSE_ARGS, [])
+        return dump.get('choose_args').get(CRUSHMap.DEFAULT_CHOOSE_ARGS, [])
 
 
 class MgrStandbyModule(ceph_module.BaseMgrStandbyModule):