X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfatables%2Fsfatables;fp=sfatables%2Fsfatables;h=59628e75468d7f0be6d91aeddd2943aaebee798b;hb=dc1c09e790d507ba6f2258459374a4dcda7decce;hp=1428dc06bb25f26f6209e30486015ade820392ce;hpb=35cf792a57a2e5680340ec3ff6a8c934059d523c;p=sfa.git diff --git a/sfatables/sfatables b/sfatables/sfatables index 1428dc06..59628e75 100755 --- a/sfatables/sfatables +++ b/sfatables/sfatables @@ -52,9 +52,8 @@ def create_parser_xml_ext(ext_dict): for k in ext_dict.keys(): command = ext_dict[k] - pdb.set_trace() for arg in command.arguments: - parser.add_option(None,"--"+arg,dest=arg,help=command.help,metavar=command.operand) + parser.add_option('',"--"+arg['name'],dest=arg['name'],help=arg['help'],metavar=arg['target']) return parser @@ -100,9 +99,9 @@ def main(): raise Exception("Must specify a target for this command") target_dict = load_xml_extensions("sfatables.targets",targets.all) target_parser = create_parser_xml_ext(target_dict) - targets = ",".join(target_dict.keys()) - (target_options, args) = target_parser.parse_args(pargs[2]) + targets_str = ",".join(target_dict.keys()) target_parser.add_option('-j','--jump',dest='target_name',help='Target name (one of %s)'%targets, metavar = 'TARGET') + (target_options, args) = target_parser.parse_args(pargs[2]) else: target_options = None