login: also check lines for login, which do not start with a l
authorJonatan Schlag <jonatan.schlag@ipfire.org>
Sat, 21 Apr 2018 11:18:51 +0000 (13:18 +0200)
committerJonatan Schlag <jonatan.schlag@ipfire.org>
Sat, 21 Apr 2018 11:18:51 +0000 (13:18 +0200)
When we get 'alice login:' the lines do not start with an 'l' so we can
not assume that all lines which start not with an 'l' are not our login
line.

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
test.py

diff --git a/test.py b/test.py
index f7f7c66..54d256d 100755 (executable)
--- a/test.py
+++ b/test.py
@@ -308,11 +308,6 @@ class connection():
 
         # Read all line till we get login:
         while 1:
-            data = self.peek()
-            if not data.decode() == "l":
-                self.log.debug("We get no l at the start")
-                self.log_console_line(self.readline().decode())
-
             # We need to use self.in_waiting because with self.con.in_waiting we get
             # not the complete string
             size = len(self.buffer) + self.in_waiting