X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfatables%2Fcommands%2FList.py;h=70d720649d59625037a5f9dcc4509f1899cb6fbc;hb=bfcea75fd4f7d91b186f4f0e479db0e6f0a231ae;hp=fcb1413853d1385fd4a741e0409c428c4a3ede64;hpb=b940fd55d99f2929cd0d6b47dd6d75db714c90cd;p=sfa.git diff --git a/sfatables/commands/List.py b/sfatables/commands/List.py index fcb14138..70d72064 100644 --- a/sfatables/commands/List.py +++ b/sfatables/commands/List.py @@ -1,19 +1,19 @@ import os, time import libxml2 -import pdb from sfatables.globals import * from sfatables.pretty import Pretty from sfatables.command import Command class List(Command): - options = [('-L','--list')] - help = 'List a chain' - key='list_rule' - matches = False - targets = False - + def __init__(self): + self.options = [('-L','--list')] + self.help = 'List a chain' + self.key='list_rule' + self.matches = False + self.targets = False + return def get_info(self, type, xmlextension_path): @@ -27,7 +27,6 @@ class List(Command): value_nodes = p.xpathEval("//rule/argument[value!='']/value") element_nodes = p.xpathEval("//argument[value!='']/parent::rule/@element") - print element_nodes, type, xmlextension_path if (len(element_nodes)>1): raise Exception("Invalid rule %s contains multiple elements."%xmlextension_path)