commit b1f06a9be6f682a9d0325fd6b790bb24aa2d8745
parent d296a0c73787537ad9ea087f213083f29fbd6f8f
Author: Louis Burda <quent.burda@gmail.com>
Date: Mon, 31 May 2021 21:37:10 +0200
fix using both byte and string authstr in checker's do_auth, checked in empty data folder for service
Diffstat:
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/checker/src/checker.py b/checker/src/checker.py
@@ -68,10 +68,10 @@ class STLDoctorChecker(BaseChecker):
return "".join([chr(random.randint(32, 127)) for i in range(idlen)])
def do_auth(self, conn, authstr):
+ authstr = ensure_bytes(authstr)
conn.write("auth\n")
- conn.write(authstr + "\n")
+ conn.write(authstr + b"\n")
resp = conn.recvuntil(self.prompt)
- authstr = ensure_bytes(authstr)
assert_in(b"Success!", resp, f"Login with pass {authstr} failed");
def check_listed(self, conn, modelid):
diff --git a/service/.gitignore b/service/.gitignore
@@ -1 +1,2 @@
-data/
+data/*
+!data/.keep
diff --git a/service/data/.keep b/service/data/.keep