New Param: fixed metavar bug in cli.py

This commit is contained in:
Jason Gerard DeRose 2009-01-16 11:07:21 -07:00
parent 462bac3c13
commit 7514f96173
2 changed files with 6 additions and 2 deletions

View File

@ -807,7 +807,7 @@ class CLI(object):
else:
kw['action'] = 'store_true'
else:
kw['metavar'] = metavar=option.type.name.upper()
kw['metavar'] = metavar=option.__class__.__name__.upper()
o = optparse.make_option('--%s' % to_cli(option.cli_name), **kw)
parser.add_option(o)
return parser

View File

@ -53,7 +53,11 @@ class xmlserver(Backend):
result = self.Command[method](*args, **options)
return (result,) # Must wrap XML-RPC response in a tuple singleton
def execute(self, data, ccache=None, client_ip=None, languages=None):
def execute(self, data, ccache=None, client_version=None,
client_ip=None, languages=None):
"""
Execute the XML-RPC request in contained in ``data``.
"""
try:
(params, method) = xml_loads(data)
response = self.dispatch(method, params)