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:
aab206b
)
(no commit message)
author
Sapan Bhatia
<sapanb@cs.princeton.edu>
Sat, 15 Aug 2009 00:46:01 +0000
(
00:46
+0000)
committer
Sapan Bhatia
<sapanb@cs.princeton.edu>
Sat, 15 Aug 2009 00:46:01 +0000
(
00:46
+0000)
sfatables/sfatables
patch
|
blob
|
history
diff --git
a/sfatables/sfatables
b/sfatables/sfatables
index
977153e
..
cbef86e
100755
(executable)
--- a/
sfatables/sfatables
+++ b/
sfatables/sfatables
@@
-14,17
+14,17
@@
import libxml2
from optparse import OptionParser
from sfatables import commands, matches, targets
from optparse import OptionParser
from sfatables import commands, matches, targets
-from sfatables import Xmlextension
+from sfatables
.xmlextension
import Xmlextension
def load_commands(module, list):
def load_commands(module, list):
-
ext
_dict={}
+
command
_dict={}
for command_name in list:
command_module = __import__(".".join([module,command_name]),fromlist=[module])
command = getattr(command_module, command_name)
command_dict[command_name]=command()
for command_name in list:
command_module = __import__(".".join([module,command_name]),fromlist=[module])
command = getattr(command_module, command_name)
command_dict[command_name]=command()
- return
ext
_dict
+ return
command
_dict
def load_xml_extensions(module, list):
ext_dict={}
def load_xml_extensions(module, list):
ext_dict={}
@@
-51,8
+51,8
@@
def xml_ext_create_parser(ext_dict):
parser = OptionParser(usage="sfatables [command] [chain] [match] [target]",
description='See "man sfatables" for more detail.')
parser = OptionParser(usage="sfatables [command] [chain] [match] [target]",
description='See "man sfatables" for more detail.')
- for k in
command
_dict.keys():
- command =
command
_dict[k]
+ for k in
ext
_dict.keys():
+ command =
ext
_dict[k]
for arg in command.arguments:
parser.add_option(None,"--"+arg,dest=arg,help=command.help,metavar=command.operand)
for arg in command.arguments:
parser.add_option(None,"--"+arg,dest=arg,help=command.help,metavar=command.operand)