(self, source)
| 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: |
no test coverage detected