Show More
@@ -690,14 +690,15 b' def _defaultcacerts(ui):' | |||||
690 | We don't print a message when the Python is able to load default |
|
690 | We don't print a message when the Python is able to load default | |
691 | CA certs because this scenario is detected at socket connect time. |
|
691 | CA certs because this scenario is detected at socket connect time. | |
692 | """ |
|
692 | """ | |
693 |
# The "certifi" Python package provides certificates. If it is installed |
|
693 | # The "certifi" Python package provides certificates. If it is installed | |
694 | # assume the user intends it to be used and use it. |
|
694 | # and usable, assume the user intends it to be used and use it. | |
695 | try: |
|
695 | try: | |
696 | import certifi |
|
696 | import certifi | |
697 | certs = certifi.where() |
|
697 | certs = certifi.where() | |
698 | ui.debug('using ca certificates from certifi\n') |
|
698 | if os.path.exists(certs): | |
699 | return certs |
|
699 | ui.debug('using ca certificates from certifi\n') | |
700 | except ImportError: |
|
700 | return certs | |
|
701 | except (ImportError, AttributeError): | |||
701 | pass |
|
702 | pass | |
702 |
|
703 | |||
703 | # On Windows, only the modern ssl module is capable of loading the system |
|
704 | # On Windows, only the modern ssl module is capable of loading the system |
General Comments 0
You need to be logged in to leave comments.
Login now