From 69a712ad4bf48eb81a503e14d9957b1186ed35f5 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 21 Aug 2019 14:41:08 -0500 Subject: [PATCH] mgr/BaseMgrModule: tolerate Int or Long for health 'count' Signed-off-by: Sage Weil --- src/mgr/BaseMgrModule.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mgr/BaseMgrModule.cc b/src/mgr/BaseMgrModule.cc index d18069236f4..af47bde60fb 100644 --- a/src/mgr/BaseMgrModule.cc +++ b/src/mgr/BaseMgrModule.cc @@ -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") { -- 2.39.5