- fix typo
authorBarış Metin <Talip-Baris.Metin@sophia.inria.fr>
Fri, 2 Oct 2009 15:24:36 +0000 (15:24 +0000)
committerBarış Metin <Talip-Baris.Metin@sophia.inria.fr>
Fri, 2 Oct 2009 15:24:36 +0000 (15:24 +0000)
- XMLRule.final_processor is not there yet, skip if not found for the moment.

sfatables/runtime.py
sfatables/xmlrule.py

index b384516..235c67f 100644 (file)
@@ -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)
index c363ab9..55796a9 100644 (file)
@@ -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)