diff --git a/pymongo/topology.py b/pymongo/topology.py index 9ca3029bf0..4083d7f331 100644 --- a/pymongo/topology.py +++ b/pymongo/topology.py @@ -556,10 +556,8 @@ def _ensure_opened(self): Hold the lock when calling this. """ if self._closed: - raise InvalidOperation("Once a MongoClient is closed, " - "all operations will fail. Please create " - "a new client object if you wish to " - "reconnect.") + raise InvalidOperation("Cannot use MongoClient after close") + if not self._opened: self._opened = True self._update_servers()