From 097c249cf597a7b35cf0f04931134742c5019ec9 Mon Sep 17 00:00:00 2001 From: Vasu Kulkarni Date: Tue, 9 Oct 2018 13:27:27 -0700 Subject: [PATCH] check if osd id is an integer, if so use it and discard any empty or non integer ids. Signed-off-by: Vasu Kulkarni --- teuthology/task/ceph_ansible.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/teuthology/task/ceph_ansible.py b/teuthology/task/ceph_ansible.py index 72a438efc5..d575e4ec52 100644 --- a/teuthology/task/ceph_ansible.py +++ b/teuthology/task/ceph_ansible.py @@ -702,7 +702,8 @@ class CephAnsible(Task): osd_list = [] for osd_id in osd_list_all: try: - osd_list.append(osd_id) + if type(int(osd_id)) is int: + osd_list.append(osd_id) except ValueError: # ignore any empty lines as part of output pass -- 2.39.5