From 43e677dded08bd620c8fb09b3ade6b925b6fc5bc Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Fri, 13 Jan 2017 16:14:46 -0800 Subject: [PATCH] test/pybind/test_rados.py: tolerate empty output from mon ping Fixes: http://tracker.ceph.com/issues/18529 Signed-off-by: Samuel Just --- src/test/pybind/test_rados.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/test/pybind/test_rados.py b/src/test/pybind/test_rados.py index 6a70f12daaf64..50b09053cdd00 100644 --- a/src/test/pybind/test_rados.py +++ b/src/test/pybind/test_rados.py @@ -144,7 +144,10 @@ def test_ping_monitor(self): 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