From 57a9d9950b38dc3b3a98d38c60edcf47aedb24df Mon Sep 17 00:00:00 2001 From: Sapan Bhatia Date: Tue, 15 Sep 2009 14:37:28 +0000 Subject: [PATCH] Bug fix. --- sfatables/command.py | 7 +++++++ sfatables/exec.py | 3 +-- sfatables/xmlextension.py | 12 ++++++------ 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/sfatables/command.py b/sfatables/command.py index 825c9f2b..1cb58e7d 100644 --- a/sfatables/command.py +++ b/sfatables/command.py @@ -9,6 +9,13 @@ class Command: action = 'store_const' def __init__(self): + self.options = [] + self.help = '' + self.type = 'command' + self.matches = False + self.targets = False + self.action = 'store_const' + return def call(self, coptions, moptions, toptions): diff --git a/sfatables/exec.py b/sfatables/exec.py index ef0933d0..778d73d8 100644 --- a/sfatables/exec.py +++ b/sfatables/exec.py @@ -13,9 +13,8 @@ from sfatables.commands.List import * from sfatables.xmlrule import * class SFATablesRules: - sorted_rule_list = [] - def __init__(self, chain_name): + self.sorted_rule_list = [] chain_dir_path = "%s/%s"%(sfatables_config,chain_name) rule_list = List().get_rule_list(chain_dir_path) for rule_number in rule_list: diff --git a/sfatables/xmlextension.py b/sfatables/xmlextension.py index 77219eb2..4fc1ab58 100644 --- a/sfatables/xmlextension.py +++ b/sfatables/xmlextension.py @@ -8,13 +8,13 @@ import libxml2 from sfatables.globals import * class Xmlextension: - context = "" - processor = "" - operand = "VALUE" - arguments = [] - terminal = 0 - def __init__(self, dir, component_name): + self.context = "" + self.processor = "" + self.operand = "VALUE" + self.arguments = [] + self.terminal = 0 + filename = dir+"/"+component_name+".xml" self.xmldoc = libxml2.parseFile(filename) -- 2.43.0