summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extras/qmf/src/py/qmf/console.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/extras/qmf/src/py/qmf/console.py b/extras/qmf/src/py/qmf/console.py
index ecb0e1d9d0..291b9bcc5f 100644
--- a/extras/qmf/src/py/qmf/console.py
+++ b/extras/qmf/src/py/qmf/console.py
@@ -359,8 +359,8 @@ class Object(object):
for arg in method.arguments:
if arg.dir.find("I") != -1:
count += 1
- if count != len(args):
- raise Exception("Incorrect number of arguments: expected %d, got %d" % (count, len(args)))
+ if count != len(args) + len(kwargs):
+ raise Exception("Incorrect number of arguments: expected %d, got %d" % (count, len(args) + len(kwargs)))
if self._agent.isV2:
#
@@ -372,7 +372,10 @@ class Object(object):
argMap = {}
for arg in method.arguments:
if arg.dir.find("I") != -1:
- argMap[arg.name] = args[aIdx]
+ if aIdx < len(args):
+ argMap[arg.name] = args[aIdx]
+ else:
+ argMap[arg.name] = kwargs[arg.name]
aIdx += 1
call['_arguments'] = argMap
@@ -439,6 +442,10 @@ class Object(object):
else:
sync = True
+ # Remove special "meta" kwargs before handing to _sendMethodRequest() to process
+ if "_timeout" in kwargs: del kwargs["_timeout"]
+ if "_async" in kwargs: del kwargs["_async"]
+
seq = self._sendMethodRequest(name, args, kwargs, sync, timeout)
if seq:
if not sync: