diff --git a/monkey/infection_monkey/credential_repository/aggregating_propagation_credentials_repository.py b/monkey/infection_monkey/credential_repository/aggregating_propagation_credentials_repository.py index cffa2b277..f7c86c30d 100644 --- a/monkey/infection_monkey/credential_repository/aggregating_propagation_credentials_repository.py +++ b/monkey/infection_monkey/credential_repository/aggregating_propagation_credentials_repository.py @@ -45,7 +45,7 @@ class AggregatingPropagationCredentialsRepository(IPropagationCredentialsReposit self._add_secret(credentials.secret) def _add_identity(self, identity: Identity): - if type(identity) == Username: + if isinstance(identity, Username): self._stored_credentials.setdefault("exploit_user_list", set()).add(identity.username) def _add_secret(self, secret: Secret):