Skip to content

Commit e41ecc4

Browse files
committed
Remove redundant exception class in Mongo check_fn
1 parent 3d69f0d commit e41ecc4

File tree

1 file changed

+1
-1
lines changed
  • src/pytest_mock_resources/container

1 file changed

+1
-1
lines changed

src/pytest_mock_resources/container/mongo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def check_fn(self):
4343
client = pymongo.MongoClient(self.host, self.port, timeoutMS=1000)
4444
db = client[self.root_database]
4545
db.command("ismaster")
46-
except (pymongo.errors.ConnectionFailure, pymongo.errors.PyMongoError):
46+
except pymongo.errors.PyMongoError:
4747
raise ContainerCheckFailed(
4848
f"Unable to connect to a presumed MongoDB test container via given config: {self}"
4949
)

0 commit comments

Comments
 (0)