diff --git a/src/charm.py b/src/charm.py index ff83fbdc3..d86a0c4ac 100755 --- a/src/charm.py +++ b/src/charm.py @@ -322,7 +322,7 @@ def _on_start(self, event: StartEvent) -> None: return # check if this unit's deployment of MongoDB is ready - with MongoDBConnection(self.mongodb_config, f"localhost", direct=True) as direct_mongo: + with MongoDBConnection(self.mongodb_config, "localhost", direct=True) as direct_mongo: if not direct_mongo.is_ready: logger.debug("mongodb service is not ready yet.") self.unit.status = WaitingStatus("waiting for MongoDB to start") @@ -495,7 +495,7 @@ def _on_update_status(self, event: UpdateStatusEvent): return # Cannot check more advanced MongoDB statuses if mongod hasn't started. - with MongoDBConnection(self.mongodb_config, f"localhost", direct=True) as direct_mongo: + with MongoDBConnection(self.mongodb_config, "localhost", direct=True) as direct_mongo: if not direct_mongo.is_ready: self.unit.status = WaitingStatus("Waiting for MongoDB to start") return @@ -952,7 +952,7 @@ def _initialise_replica_set(self, event: StartEvent) -> None: # can be corrupted. return - with MongoDBConnection(self.mongodb_config, f"localhost", direct=True) as direct_mongo: + with MongoDBConnection(self.mongodb_config, "localhost", direct=True) as direct_mongo: try: logger.info("Replica Set initialization") direct_mongo.init_replset() @@ -1045,7 +1045,7 @@ def start_mongod_service(self): mongodb_snap = snap_cache["charmed-mongodb"] mongodb_snap.start(services=["mongod"]) - # charms running as config server are responsible for maintaing a server side mongos + # charms running as config server are responsible for maintaining a server side mongos if self.is_role(Config.CONFIG_SERVER): mongodb_snap.start(services=["mongos"]) @@ -1059,7 +1059,7 @@ def stop_mongod_service(self): mongodb_snap = snap_cache["charmed-mongodb"] mongodb_snap.stop(services=["mongod"]) - # charms running as config server are responsible for maintaing a server side mongos + # charms running as config server are responsible for maintaining a server side mongos if self.is_role(Config.CONFIG_SERVER): mongodb_snap.stop(services=["mongos"])