From dbeb4a861db89346738acf22d7285801a590d866 Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Fri, 15 May 2026 12:07:12 -0700 Subject: [PATCH] firewalld_info: Use PY2 compatible syntax (#719) Signed-off-by: Abhijeet Kasurde --- changelogs/fragments/firewalld_info_warnings.yml | 2 +- plugins/modules/firewalld_info.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/changelogs/fragments/firewalld_info_warnings.yml b/changelogs/fragments/firewalld_info_warnings.yml index d9616ab..c214964 100644 --- a/changelogs/fragments/firewalld_info_warnings.yml +++ b/changelogs/fragments/firewalld_info_warnings.yml @@ -1,3 +1,3 @@ --- minor_changes: - - firewalld_info - use module.warn instead of passing `warnings` to `exit_json` (https://github.com/ansible-collections/ansible.posix/issues/710). + - firewalld_info - use module.warn instead of passing ``warnings`` to ``exit_json`` (https://github.com/ansible-collections/ansible.posix/issues/710). diff --git a/plugins/modules/firewalld_info.py b/plugins/modules/firewalld_info.py index 4372e30..8c5536e 100644 --- a/plugins/modules/firewalld_info.py +++ b/plugins/modules/firewalld_info.py @@ -352,7 +352,7 @@ def main(): collect_zones = list(set(specified_zones) & set(all_zones)) ignore_zones = list(set(specified_zones) - set(collect_zones)) if ignore_zones: - module.warn(f'Please note: zone:({",".join(ignore_zones)}) have been ignored in the gathering process.') + module.warn('Please note: zone:(%s) have been ignored in the gathering process.' % ", ".join(ignore_zones)) else: collect_zones = get_all_zones(client)