From 3e95ec6ee464f6dd1a09a7f16f73ad14a2b92bf5 Mon Sep 17 00:00:00 2001 From: Kekoa Kaaikala Date: Wed, 21 Sep 2022 18:06:53 +0000 Subject: [PATCH] Island: Fix mypy issues in server_setup.py --- monkey/monkey_island/cc/server_setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monkey/monkey_island/cc/server_setup.py b/monkey/monkey_island/cc/server_setup.py index 58e5adb40..7b1216419 100644 --- a/monkey/monkey_island/cc/server_setup.py +++ b/monkey/monkey_island/cc/server_setup.py @@ -4,7 +4,7 @@ import logging import sys from pathlib import Path from threading import Thread -from typing import Sequence, Tuple +from typing import Optional, Sequence, Tuple import gevent.hub import requests @@ -151,7 +151,7 @@ def _start_mongodb(data_dir: Path) -> MongoDbProcess: return mongo_db_process -def _connect_to_mongodb(mongo_db_process: MongoDbProcess): +def _connect_to_mongodb(mongo_db_process: Optional[MongoDbProcess]): try: mongo_setup.connect_to_mongodb(MONGO_CONNECTION_TIMEOUT) except mongo_setup.MongoDBTimeOutError as err: