Update to 2020-12-08 15:00

master
Daniel Berteaud 4 years ago
parent 516d4ee6be
commit b17368d0bc
  1. 6
      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 []

Loading…
Cancel
Save