From 007c7f4bad222c21a4618dd17ce33db8ad8f8fe6 Mon Sep 17 00:00:00 2001 From: Dmitriy Smirnov Date: Mon, 27 May 2024 12:20:33 +0300 Subject: [PATCH] Fix if-condition in DecortController.pfw_configure method for excluding case of TypeError --- module_utils/decort_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module_utils/decort_utils.py b/module_utils/decort_utils.py index 53f71c9..7eb3bd1 100644 --- a/module_utils/decort_utils.py +++ b/module_utils/decort_utils.py @@ -3136,7 +3136,7 @@ class DecortController(object): if runner['vmId'] == comp_facts['id']: existing_rules.append(runner) - if not len(existing_rules) and not len(new_rules): + if not existing_rules and not new_rules: self.result['failed'] = False self.result['warning'] = ("pfw_configure(): both existing and new port forwarding rule lists " "for Compute ID {} are empty - nothing to do.").format(comp_facts['id'])