kazanzhy commented on a change in pull request #20651:
URL: https://github.com/apache/airflow/pull/20651#discussion_r778221504
##########
File path: airflow/providers/imap/hooks/imap.py
##########
@@ -71,7 +71,7 @@ def get_conn(self) -> 'ImapHook':
"""
if not self.mail_client:
conn = self.get_connection(self.imap_conn_id)
- self.mail_client = imaplib.IMAP4_SSL(conn.host, conn.port or
imaplib.IMAP4_SSL_PORT)
+ self.mail_client = imaplib.IMAP4_SSL(conn.host, conn.port or
imaplib.IMAP4_SSL.port)
Review comment:
Yeap, if we do not pass the port in the constructor then the default
will be used.
I even wanted to suggest `__all__.extend("IMAP4_SSL", "IMAP4_SSL_PORT"])`
here
https://github.com/python/cpython/blob/7d7817cf0f826e566d8370a0e974bbfed6611d91/Lib/imaplib.py#L1338
but decided that these changes won't be applied soon
Do not close :)
Let's just wait for the review and will see
--
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]