From 66853e1156e0edbed7ef6baf4197e7bc12cfa9b0 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Sat, 7 Jan 2023 14:16:22 -0500 Subject: [PATCH] ucsAccounts: Strip leading/trailing periods This fixes a member whose name ended with "Jr." --- memberPlumbing/ucsAccounts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/memberPlumbing/ucsAccounts.py b/memberPlumbing/ucsAccounts.py index 310ea64..48ea239 100755 --- a/memberPlumbing/ucsAccounts.py +++ b/memberPlumbing/ucsAccounts.py @@ -29,7 +29,7 @@ def sanitize_group_name(name): # From an API error message: "Username must only contain numbers, letters and dots!" def sanitize_user_name(name): - return re.sub(r"[^0-9a-z.]", ".", name.lower()) + return re.sub(r"[^0-9a-z.]", ".", name.lower()).strip(".") async def make_groups(group_mod, members):