diff mercurial/sslutil.py @ 46786:52528570312e stable

typing: disable module attribute warnings for properly conditionalized code Differential Revision: https://phab.mercurial-scm.org/D10208
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 13 Mar 2021 00:40:46 -0500
parents 521ac0d7047f
children d4ba4d51f85f
line wrap: on
line diff
--- a/mercurial/sslutil.py	Sat Mar 13 00:38:59 2021 -0500
+++ b/mercurial/sslutil.py	Sat Mar 13 00:40:46 2021 -0500
@@ -543,7 +543,9 @@
     # Use the list of more secure ciphers if found in the ssl module.
     if util.safehasattr(ssl, b'_RESTRICTED_SERVER_CIPHERS'):
         sslcontext.options |= getattr(ssl, 'OP_CIPHER_SERVER_PREFERENCE', 0)
+        # pytype: disable=module-attr
         sslcontext.set_ciphers(ssl._RESTRICTED_SERVER_CIPHERS)
+        # pytype: enable=module-attr
 
     if requireclientcert:
         sslcontext.verify_mode = ssl.CERT_REQUIRED