fgimian / paramiko-expect

A Python expect-like extension for the Paramiko SSH library which also supports tailing logs.
MIT License
204 stars 78 forks source link

0.3.0 expect match issue when channel receives multiple lines of strings at the same time. #69

Open vinaykumar-c opened 3 years ago

vinaykumar-c commented 3 years ago

In latest version 0.3.0 we are facing an issue in expect method when self.channel.recv(self.buffer) receives multiple lines of strings at the same time. The expect will not match due to bellow piece of code where we are taking only the last line to check re.match

current_buffer_output_decoded = '\n' + self.current_output.splitlines()[-1]

zebbarry commented 3 years ago

Experiencing the same problem