From ba1e9be8f89416f0a18dcf070553c414e065a291 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Tue, 3 Aug 2021 09:43:10 -0400 Subject: [PATCH] Island: Change .format() to format string in mongo_setup.py --- monkey/monkey_island/cc/setup/mongo/mongo_setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monkey/monkey_island/cc/setup/mongo/mongo_setup.py b/monkey/monkey_island/cc/setup/mongo/mongo_setup.py index 6ebd6e89b..f5b51e514 100644 --- a/monkey/monkey_island/cc/setup/mongo/mongo_setup.py +++ b/monkey/monkey_island/cc/setup/mongo/mongo_setup.py @@ -53,7 +53,7 @@ def _wait_for_mongo_db_server(mongo_url): start_time = time.time() while not is_db_server_up(mongo_url): - logger.info("Waiting for MongoDB server on {0}".format(mongo_url)) + logger.info(f"Waiting for MongoDB server on {mongo_url}") if (time.time() - start_time) > TIMEOUT: raise MongoDBTimeOutException(f"Failed to connect to MongoDB after {TIMEOUT} seconds.") @@ -74,7 +74,7 @@ def _assert_mongo_db_version(mongo_url): f"Mongo DB version too old. {required_version} is required, but got {server_version}." ) else: - logger.info("Mongo DB version OK. Got {0}".format(str(server_version))) + logger.info(f"Mongo DB version OK. Got {server_version}") class MongoDBTimeOutException(Exception):