Fix find_account

still not finished
This commit is contained in:
2024-02-06 18:08:40 +01:00
parent b0a0dd6654
commit 12df2eae06
2 changed files with 6 additions and 3 deletions
+5 -2
View File
@@ -41,5 +41,8 @@ class ACAuthenticator:
return login_res
def find_account(self, name):
# FIXME: implement search
return self.accounts[0]
found = list(filter(lambda a: a['user_display_name'] == name,
self.accounts))
if len(found) == 0:
raise Exception("Account '%s' not found!" % name)
return found[0]
+1 -1
View File
@@ -2,4 +2,4 @@
[LOGIN]
username = you@example.com
password = very-secret
account_name = "#123456"
account_name = #123456