greeterbot: better comparison method

Co-authored-by: holger krekel  <holger@merlinux.eu>
This commit is contained in:
missytake
2024-01-18 17:09:23 +01:00
committed by GitHub
parent 185e6f7d2a
commit 768bf2b22c

View File

@@ -46,7 +46,7 @@ def is_allowed_to_create(config: Config, user, cleartext_password) -> bool:
len(localpart) > config.username_max_length
or len(localpart) < config.username_min_length
):
if localpart != "echo" and localpart != "hello":
if localpart not in ("echo", "hello"):
logging.warning(
"localpart %s has to be between %s and %s chars long",
localpart,