def _exec_pod_command(self, resp, command):
    if resp.is_open():
        self.log.info('Running command... %s\n', command)
        resp.write_stdin((command + '\n'))
        while resp.is_open():
            resp.update(timeout=1)
            if resp.peek_stdout():
                return resp.read_stdout()
            if resp.peek_stderr():
                self.log.info(resp.read_stderr())
                break
    return None
def _exec_pod_command(self, resp, command):
    if resp.is_open():
        self.log.info('Running command... %s\n', command)
        resp.write_stdin((command + '\n'))
        while resp.is_open():
            resp.update(timeout=1)
            if resp.peek_stdout():
                return resp.read_stdout()
            if resp.peek_stderr():
                self.log.info(resp.read_stderr())
                break
    return None