jp (debug/bridge/method,signal): fixed argument parsing
This commit is contained in:
parent
78750cb265
commit
6a007eb69a
1 changed files with 2 additions and 2 deletions
|
|
@ -31,7 +31,7 @@ class BridgeCommon(object):
|
|||
def evalArgs(self):
|
||||
if self.args.arg:
|
||||
try:
|
||||
return eval(u",".join(self.args.arg))
|
||||
return eval(u'[{}]'.format(u",".join(self.args.arg)))
|
||||
except SyntaxError as e:
|
||||
self.disp(u"Can't evaluate arguments: {mess}\n{text}\n{offset}^".format(
|
||||
mess=e,
|
||||
|
|
@ -67,7 +67,7 @@ class Method(base.CommandBase, BridgeCommon):
|
|||
method = getattr(self.host.bridge, self.args.method)
|
||||
args = self.evalArgs()
|
||||
try:
|
||||
method(*self.args.arg, profile=self.profile, callback=self.method_cb, errback=self.method_eb)
|
||||
method(*args, profile=self.profile, callback=self.method_cb, errback=self.method_eb)
|
||||
except TypeError:
|
||||
# maybe the method doesn't need a profile ?
|
||||
try:
|
||||
|
|
|
|||
Loading…
Reference in a new issue