Fix find_account
still not finished
This commit is contained in:
@@ -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
@@ -2,4 +2,4 @@
|
||||
[LOGIN]
|
||||
username = you@example.com
|
||||
password = very-secret
|
||||
account_name = "#123456"
|
||||
account_name = #123456
|
||||
Reference in New Issue
Block a user