Island: Use get_file_contents() in IslandLog

This commit is contained in:
Shreya Malviya 2022-08-02 18:11:25 +05:30
parent cb79708fda
commit 82e92e39e4
1 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@ from pathlib import Path
from monkey_island.cc.resources.AbstractResource import AbstractResource
from monkey_island.cc.resources.request_authentication import jwt_required
from monkey_island.cc.server_utils.island_logger import get_log_file_contents
from monkey_island.cc.server_utils.file_utils import get_file_contents
logger = logging.getLogger(__name__)
@ -17,6 +17,6 @@ class IslandLog(AbstractResource):
@jwt_required
def get(self):
try:
return get_log_file_contents(self._island_log_file_path)
return get_file_contents(self._island_log_file_path)
except Exception:
logger.error("Monkey Island logs failed to download", exc_info=True)