forked from M-Labs/artiq
coredevice.comm_generic: handle RPC default args correctly.
This commit is contained in:
parent
0dd71946b9
commit
8fb6d4cdb4
@ -341,12 +341,14 @@ class CommGeneric:
|
||||
|
||||
def _receive_rpc_args(self, object_map, defaults):
|
||||
args = []
|
||||
default_arg_num = 0
|
||||
while True:
|
||||
value = self._receive_rpc_value(object_map)
|
||||
if value is self._rpc_sentinel:
|
||||
return args
|
||||
elif value is self._rpc_undefined:
|
||||
args.append(defaults[len(args)])
|
||||
args.append(defaults[default_arg_num])
|
||||
default_arg_num += 1
|
||||
else:
|
||||
args.append(value)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user