diff --git a/monkey/monkey_island/cc/repository/local_storage_file_repository.py b/monkey/monkey_island/cc/repository/local_storage_file_repository.py index 4c7662b0c..cf0444abe 100644 --- a/monkey/monkey_island/cc/repository/local_storage_file_repository.py +++ b/monkey/monkey_island/cc/repository/local_storage_file_repository.py @@ -4,10 +4,11 @@ from pathlib import Path from typing import BinaryIO from common.utils.file_utils import get_all_regular_files_in_directory +from monkey_island.cc import repository from monkey_island.cc.repository import RemovalError, RetrievalError, StorageError from monkey_island.cc.server_utils.file_utils import create_secure_directory -from . import IFileRepository, i_file_repository +from . import IFileRepository logger = logging.getLogger(__name__) @@ -49,7 +50,7 @@ class LocalStorageFileRepository(IFileRepository): return open(safe_file_path, "rb") except FileNotFoundError as err: # Wrap Python's FileNotFound error, which is-an OSError, in repository.FileNotFoundError - raise i_file_repository.FileNotFoundError( + raise repository.FileNotFoundError( f'The requested file "{unsafe_file_name}" does not exist: {err}' ) except Exception as err: