From: Sapan Bhatia <sapanb@cs.princeton.edu>
Date: Mon, 14 Sep 2009 02:39:45 +0000 (+0000)
Subject: Load terminal rules
X-Git-Tag: sfa-0.9-2~30
X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=a4a914c48938c95b54449ba151b93da369453167;p=sfa.git

Load terminal rules
---

diff --git a/sfatables/xmlrule.py b/sfatables/xmlrule.py
index df63c9a7..d787c15e 100644
--- a/sfatables/xmlrule.py
+++ b/sfatables/xmlrule.py
@@ -5,6 +5,7 @@ class XMLRule:
     rule_number = None
     chain = None
     xmldoc = None
+    terminal = 0
 
     arguments = {'match':None,'target':None}
     processors = {'match':None,'target':None}
@@ -21,6 +22,10 @@ class XMLRule:
 
         processor = p.xpathEval('//processor/@filename')
 
+        context = p.xpathEval('//attributes/attribute[@terminal="yes"]')
+        if (context != []):
+            self.terminal = 1
+        
         self.processors[type] = processor[0].content
         self.arguments[type] = p.xpathEval('//rule')