From b17368d0bcdbe07f28bcd446606d5e1b6afcc953 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Tue, 8 Dec 2020 15:00:05 +0100 Subject: [PATCH] Update to 2020-12-08 15:00 --- library/iptables_raw.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/library/iptables_raw.py b/library/iptables_raw.py index 890b5dc..090beb2 100644 --- a/library/iptables_raw.py +++ b/library/iptables_raw.py @@ -335,8 +335,10 @@ class Iptables: # Return a list of active iptables tables def _get_list_of_active_tables(self): if os.path.isfile(self.iptables_names_file): - table_names = open(self.iptables_names_file, 'r').read() - return table_names.splitlines() + table_names = "filter\n" + open(self.iptables_names_file, 'r').read() + list_set = set(table_names.splitlines()) + unique_list = (list(list_set)) + return unique_list else: return []