]> git.ipfire.org Git - nitsi.git/commitdiff
Drop unused code
authorJonatan Schlag <jonatan.schlag@ipfire.org>
Fri, 27 Apr 2018 13:52:07 +0000 (15:52 +0200)
committerJonatan Schlag <jonatan.schlag@ipfire.org>
Fri, 27 Apr 2018 13:52:07 +0000 (15:52 +0200)
Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
test.py

diff --git a/test.py b/test.py
index 2b26e6815cfe09440eb36127715f0f6984e16bb7..0ec69b5128a1dd7e0052f4ace688cb6928c7478d 100755 (executable)
--- a/test.py
+++ b/test.py
@@ -251,41 +251,6 @@ class connection():
 
         return False
 
-    def readline2(self, pattern=None):
-        string = ""
-        string2 = b""
-        if pattern:
-            pattern = re.compile(pattern)
-
-        while 1:
-            char = self.con.read(1)
-            string = string + char.decode("utf-8")
-            string2 = string2 + char
-            #print(char)
-            print(char.decode("utf-8"), end="")
-
-            #print(string2)
-            if pattern and pattern.match(string):
-               #print("get here1")
-               #print(string2)
-               return {"string" : string, "return-code" : 1}
-
-            if char == b"\n":
-                #print(char)
-                #print(string2)
-                #print("get here2")
-                return {"return-code" : 0}
-
-    def check_logged_in(self, username):
-        pattern = "^\[" + username + "@.+\]#"
-        data = self.readline(pattern=pattern)
-        if data["return-code"] == 1:
-                print("We are logged in")
-                return True
-        else:
-            print("We are  not logged in")
-            return False
-
     def print_lines_in_buffer(self):
         while True:
             self.log.debug("Fill buffer ...")