kazanzhy commented on a change in pull request #20651:
URL: https://github.com/apache/airflow/pull/20651#discussion_r778212808



##########
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:
       I think this solution might be not correct.
   There is no class attribute for `IMAP4_SSL`, and `self.port` is defined in 
method `open`.
   See how I decided to resolve this issue
   
https://github.com/apache/airflow/pull/20654/files#diff-b986a5d7078309e7eaad82d9b534ead3b21f0f884c927fdd21674cd4390a935a




-- 
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]


Reply via email to