Skip to content
This repository has been archived by the owner on Nov 28, 2024. It is now read-only.

Commit

Permalink
Using logging instead of print for timeout message
Browse files Browse the repository at this point in the history
Changing the method to print the informational message of `EXCESS TIME RECV_READY TIMEOUT, did you expect() before a send()` from print to logging.info
  • Loading branch information
oskrdt authored and fruch committed Aug 3, 2023
1 parent 597297d commit dad7577
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion paramiko_expect.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import socket
import struct
import time
import logging

# Windows does not have termios
try:
Expand Down Expand Up @@ -172,7 +173,7 @@ def expect(
while not self.channel.closed and not self.channel.recv_ready():
time.sleep(.009)
if time.time() >= (base_time + timeout):
print('EXCESS TIME RECV_READY TIMEOUT, did you expect() before a send()')
logging.info('EXCESS TIME RECV_READY TIMEOUT, did you expect() before a send()')
return -1
# Read some of the output
current_buffer = self.channel.recv(self.buffer_size)
Expand Down

0 comments on commit dad7577

Please sign in to comment.