stamixthereal commented on code in PR #28675:
URL: https://github.com/apache/airflow/pull/28675#discussion_r1062167244
##########
airflow/providers/mongo/hooks/mongo.py:
##########
@@ -74,12 +68,13 @@ def __exit__(
exc_val: BaseException | None,
exc_tb: TracebackType | None,
) -> None:
- if self.client is not None:
- self.close_conn()
+ if self.client:
+ self.client.close()
+ self.client = None
def get_conn(self) -> MongoClient:
"""Fetches PyMongo Client"""
- if self.client is not None:
+ if self.client:
Review Comment:
@potiuk What do you think here?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]