git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3a11c9b
)
Load terminal rules
author
Sapan Bhatia
<sapanb@cs.princeton.edu>
Mon, 14 Sep 2009 02:39:45 +0000
(
02:39
+0000)
committer
Sapan Bhatia
<sapanb@cs.princeton.edu>
Mon, 14 Sep 2009 02:39:45 +0000
(
02:39
+0000)
sfatables/xmlrule.py
patch
|
blob
|
history
diff --git
a/sfatables/xmlrule.py
b/sfatables/xmlrule.py
index
df63c9a
..
d787c15
100644
(file)
--- 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')