From 088ec94269fdbc8eefb78c1eb7d62b16bfc36a7e Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Mon, 11 Jul 2022 08:02:20 -0400 Subject: [PATCH] Island: Rename _delete_collection -> _remove_credentials_fom_collection --- .../cc/repository/mongo_credentials_repository.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/monkey/monkey_island/cc/repository/mongo_credentials_repository.py b/monkey/monkey_island/cc/repository/mongo_credentials_repository.py index 4d9566420..454196ee8 100644 --- a/monkey/monkey_island/cc/repository/mongo_credentials_repository.py +++ b/monkey/monkey_island/cc/repository/mongo_credentials_repository.py @@ -43,10 +43,14 @@ class MongoCredentialsRepository(ICredentialsRepository): ) def remove_configured_credentials(self): - MongoCredentialsRepository._delete_collection(self._mongo.db.configured_credentials) + MongoCredentialsRepository._remove_credentials_fom_collection( + self._mongo.db.configured_credentials + ) def remove_stolen_credentials(self): - MongoCredentialsRepository._delete_collection(self._mongo.db.stolen_credentials) + MongoCredentialsRepository._remove_credentials_fom_collection( + self._mongo.db.stolen_credentials + ) def remove_all_credentials(self): self.remove_configured_credentials() @@ -74,7 +78,7 @@ class MongoCredentialsRepository(ICredentialsRepository): raise StorageError(err) @staticmethod - def _delete_collection(collection): + def _remove_credentials_fom_collection(collection): try: collection.delete_many({}) except RemovalError as err: