# pgid will already be in the command for the pg <pgid>
# form, but for tell <pgid>, we need to put it in
if cmd:
- cmddict = json.loads(cmd[0])
+ cmddict = json.loads(cmd)
cmddict['pgid'] = pgid
else:
cmddict = dict(pgid=pgid)
- cmd = [json.dumps(cmddict)]
+ cmd = json.dumps(cmddict)
if verbose:
print('submit {0} for pgid {1}'.format(cmd, pgid),
file=sys.stderr)
# use the target we were originally given
pass
ret, outbuf, outs = send_command_retry(cluster,
- target, [json.dumps(cmddict)],
+ target, json.dumps(cmddict),
inbuf, timeout, verbose)
except Exception as e:
cdef:
int _osdid = osdid
char **_cmd = to_bytes_array(cmds)
- size_t _cmdlen = len(cmd)
+ size_t _cmdlen = len(cmds)
char *_inbuf = inbuf
size_t _inbuf_len = len(inbuf)
# timeout argument, but we keep it for backward compat with old python binding
self.require_state("connected")
- pgid = cstr(pgid, 'pgid')
- cmd = cstr_list(cmd, 'cmd')
+ pgid_raw = cstr(pgid, 'pgid')
+ cmds = [cstr(cmd, 'cmd')]
inbuf = cstr(inbuf, 'inbuf')
cdef:
- char *_pgid = pgid
- char **_cmd = to_bytes_array(cmd)
- size_t _cmdlen = len(cmd)
+ char *_pgid = pgid_raw
+ char **_cmd = to_bytes_array(cmds)
+ size_t _cmdlen = len(cmds)
char *_inbuf = inbuf
size_t _inbuf_len = len(inbuf)