Skip to content
Snippets Groups Projects
Commit 3b65b995 authored by Jakub Ziebinski's avatar Jakub Ziebinski Committed by Jakub Ziebinski
Browse files

Add each new tracked account to a known list

parent 6bbcbba7
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !467. Comments created here will be created in the context of that merge request.
......@@ -198,13 +198,19 @@ class AccountManager:
if not self.has_working_account:
first_account_to_add = to_add[0]
self.set_working_account(first_account_to_add)
if not self.is_account_known(first_account_to_add):
self.known.add(first_account_to_add)
to_add = to_add[1:]
# raise AccountAlreadyExistsError if any of the accounts is already a working account
# add the account to the known list if it does not already exist there
for account in to_add:
if self.is_account_working(account):
raise AccountAlreadyExistsError(Account.ensure_account_name(account), "WorkingAccount")
if not self.is_account_known(account):
self.known.add(account)
self.watched.add(*to_add)
def remove_tracked_account(self, *to_remove: str | Account) -> None:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment