]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/BaseMgrModule: tolerate Int or Long for health 'count'
authorSage Weil <sage@redhat.com>
Wed, 21 Aug 2019 19:41:08 +0000 (14:41 -0500)
committerSage Weil <sage@redhat.com>
Wed, 21 Aug 2019 22:06:32 +0000 (17:06 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/mgr/BaseMgrModule.cc

index d18069236f4aade05204aab1491428952d66f94a..af47bde60fb42ffc422a99df38b725ae31b445a4 100644 (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") {