MCPcopy Create free account
hub / github.com/ceph/ceph / _do_runsource

Method _do_runsource

src/pybind/ceph_mgr_repl.py:29–41  ·  view source on GitHub ↗
(self, source)

Source from the content-addressed store, hash-verified

27 self.cluster.connect(timeout=opt.timeout)
28
29 def _do_runsource(self, source):
30 ret, buf, s = json_command(self.cluster,
31 prefix=self.cmd_prefix,
32 target=('mon-mgr',),
33 inbuf=source.encode(),
34 timeout=self.timeout)
35 if ret == 0:
36 # TODO: better way to encode the outputs
37 sys.stdout.write(buf.decode())
38 sys.stderr.write(s)
39 else:
40 # needs more
41 self.write("the input is not complete")
42
43 def runsource(self, source, filename='<input>', symbol='single'):
44 try:

Callers 1

runsourceMethod · 0.95

Calls 4

json_commandFunction · 0.90
encodeMethod · 0.45
writeMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected