From 96097e26b12be6c55e4aecf6070b13b030cd1cea Mon Sep 17 00:00:00 2001 From: Darksider3 Date: Sun, 20 Oct 2019 15:23:46 +0200 Subject: [PATCH] Catched that little error and killed it! --- private/lib/validator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/private/lib/validator.py b/private/lib/validator.py index a5c3be2..e1e58f9 100644 --- a/private/lib/validator.py +++ b/private/lib/validator.py @@ -20,7 +20,7 @@ def checkUsernameLength(username: str): return True -def checkUserExists(username: str, db: str): +def checkUserExists(username: str): try: pwd.getpwnam(username) except KeyError: @@ -98,7 +98,7 @@ def checkImportFile(fname: str, db: str): if not lib.validator.checkEmail(row["email"]): error_list += f"Line {ln}: E-Mail address of user '{row['username']}' '{row['email']}' is not valid.\n" valid = False - if not lib.validator.checkUserExists(row["username"], db) or checkUserInDB(row["username"], db): + if not lib.validator.checkUserExists(row["username"]) or checkUserInDB(row["username"], db): error_list += f"Line {ln}: User '{row['username']}' already exists.\n" valid = False if not lib.validator.checkDatetimeFormat(row["timestamp"]):