Skip to content
Snippets Groups Projects
Commit dd33435e authored by Hague Matthew UXAC009's avatar Hague Matthew UXAC009
Browse files

Sort UG leads results

parent 977beda4
Branches
No related tags found
No related merge requests found
......@@ -31,6 +31,8 @@ with ldap3.Connection(URI,
if (len(conn.entries) != 1):
print("Failed to find UG leads list")
else:
lead_strings = []
for lead in conn.entries[0].member:
if m := UG_LEADS_MEMBER_CN_RE.match(lead):
......@@ -44,8 +46,11 @@ with ldap3.Connection(URI,
print("Failed to find", lead_cn)
else:
for details in conn.entries:
print(
lead_strings.append(
f"{details.department}: "
f"{details.displayName} "
f"<{details.mail}>"
)
for ls in sorted(lead_strings):
print(ls)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment