Skip to content
Snippets Groups Projects

Automatically add accounts to a known list after performing the appropriate actions

Merged Jakub Ziebinski requested to merge jziebinski/known-accounts into develop
Compare and Show latest version
3 files
+ 20
4
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -204,11 +204,14 @@ class AccountManager:
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")
self.known.add(*to_add)
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:
Loading