- with timeout(time_out, exception=RuntimeError):
- while not reply.endswith(self.delimiter) or \
- self.channel.recv_ready():
- try:
- chunk = self.channel.recv(size)
- if not chunk:
- break
- reply += chunk
- if self.channel.exit_status_ready():
- logger.debug('Channel exit status ready.')
- break
- except socket.timeout:
- raise HoneycombError("Socket timeout.",
- enable_logging=False)
+ while not reply.endswith(self.delimiter) or \
+ self.channel.recv_ready():
+ try:
+ chunk = self.channel.recv(size)
+ if not chunk:
+ break
+ reply += chunk
+ if self.channel.exit_status_ready():
+ logger.debug('Channel exit status ready.')
+ break
+ except socket.timeout:
+ raise HoneycombError("Socket timeout.",
+ enable_logging=False)