diff --git a/changelogs/fragments/60412-ce_bfd_global-to-fix-bugs.yml b/changelogs/fragments/60412-ce_bfd_global-to-fix-bugs.yml new file mode 100644 index 00000000000..91248dcf7f6 --- /dev/null +++ b/changelogs/fragments/60412-ce_bfd_global-to-fix-bugs.yml @@ -0,0 +1,2 @@ +bugfixes: +- ce_bfd_global - update to fix some bugs - When BFD is unavailable, tosExp and other parameters are sent down to report errors; this error is corrected and the query results are processed again. (https://github.com/ansible/ansible/pull/60412) diff --git a/lib/ansible/modules/network/cloudengine/ce_bfd_global.py b/lib/ansible/modules/network/cloudengine/ce_bfd_global.py index d7b2d11a932..77bedb5e93f 100644 --- a/lib/ansible/modules/network/cloudengine/ce_bfd_global.py +++ b/lib/ansible/modules/network/cloudengine/ce_bfd_global.py @@ -284,7 +284,8 @@ class BfdGlobal(object): glb = root.find("bfd/bfdSchGlobal") if glb: for attr in glb: - bfd_dict["global"][attr.tag] = attr.text + if attr.text is not None: + bfd_dict["global"][attr.tag] = attr.text return bfd_dict