From 11857b3cae673afaf5c9cab28ea77814a5527642 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bar=C4=B1=C5=9F=20Metin?= Date: Fri, 2 Oct 2009 15:24:36 +0000 Subject: [PATCH] - fix typo - XMLRule.final_processor is not there yet, skip if not found for the moment. --- sfatables/runtime.py | 2 +- sfatables/xmlrule.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sfatables/runtime.py b/sfatables/runtime.py index b3845164..235c67f2 100644 --- a/sfatables/runtime.py +++ b/sfatables/runtime.py @@ -13,7 +13,7 @@ from sfatables.xmlrule import * class SFATablesRules: def __init__(self, chain_name): - self.context = None # placeholder for rspec_manger + self.contexts = None # placeholder for rspec_manger self.sorted_rule_list = [] chain_dir_path = os.path.join(sfatables_config,chain_name) rule_list = List().get_rule_list(chain_dir_path) diff --git a/sfatables/xmlrule.py b/sfatables/xmlrule.py index c363ab92..55796a9d 100644 --- a/sfatables/xmlrule.py +++ b/sfatables/xmlrule.py @@ -42,7 +42,11 @@ class XMLRule: return stylesheet_result def wrap_up(self, rspec): - filepath = 'processors/' + self.final_processor + filepath = os.path.join(sfatables_config, 'processors', self.final_processor) + + if not os.path.exists(filepath): + # TODO: final_processor is not there yet + return rspec styledoc = libxml2.parseFile(filepath) style = libxslt.parseStylesheetDoc(styledoc) -- 2.43.0