]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
test/pybind/test_rados.py: tolerate empty output from mon ping
authorSamuel Just <sjust@redhat.com>
Sat, 14 Jan 2017 00:14:46 +0000 (16:14 -0800)
committerSamuel Just <sjust@redhat.com>
Thu, 26 Jan 2017 19:46:36 +0000 (11:46 -0800)
Fixes: http://tracker.ceph.com/issues/18529
Signed-off-by: Samuel Just <sjust@redhat.com>
src/test/pybind/test_rados.py

index 6a70f12daaf64d02a89a02d79be5bcf60bc1f549..50b09053cdd006f041f33d562d5327846de5c889 100644 (file)
@@ -144,7 +144,10 @@ class TestRados(object):
         ret, buf, out = self.rados.mon_command(json.dumps(cmd), b'')
         for mon in json.loads(buf.decode('utf8'))['mons']:
             while True:
-                buf = json.loads(self.rados.ping_monitor(mon['name']))
+                output = self.rados.ping_monitor(mon['name'])
+                if output is None:
+                    continue
+                buf = json.loads(output)
                 if buf.get('health'):
                     break