mgr/BaseMgrModule: tolerate Int or Long for health 'count'

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2019-08-21 14:41:08 -05:00
parent dad94db7ae
commit 69a712ad4b

View File

@ -305,9 +305,11 @@ ceph_set_health_checks(BaseMgrModule *self, PyObject *args)
} else if (ks == "count") {
if (PyLong_Check(v)) {
count = PyLong_AsLong(v);
} else if (PyInt_Check(v)) {
count = PyInt_AsLong(v);
} else {
derr << __func__ << " check " << check_name
<< " count value not long" << dendl;
<< " count value not long or int" << dendl;
continue;
}
} else if (ks == "detail") {