Mercurial > public > mercurial-scm > hg
comparison mercurial/sslutil.py @ 25977:696f6e2be282
sslutil: use absolute_import
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 08 Aug 2015 19:56:22 -0700 |
parents | bdc15b3c9bdb |
children | 56b2bcea2529 |
comparison
equal
deleted
inserted
replaced
25976:72b36785d7f4 | 25977:696f6e2be282 |
---|---|
4 # Copyright 2006, 2007 Alexis S. L. Carvalho <alexis@cecm.usp.br> | 4 # Copyright 2006, 2007 Alexis S. L. Carvalho <alexis@cecm.usp.br> |
5 # Copyright 2006 Vadim Gelfer <vadim.gelfer@gmail.com> | 5 # Copyright 2006 Vadim Gelfer <vadim.gelfer@gmail.com> |
6 # | 6 # |
7 # This software may be used and distributed according to the terms of the | 7 # This software may be used and distributed according to the terms of the |
8 # GNU General Public License version 2 or any later version. | 8 # GNU General Public License version 2 or any later version. |
9 import os, sys, ssl | 9 |
10 | 10 from __future__ import absolute_import |
11 from mercurial import util | 11 |
12 from mercurial.i18n import _ | 12 import os |
13 import ssl | |
14 import sys | |
15 | |
16 from .i18n import _ | |
17 from . import util | |
13 | 18 |
14 _canloaddefaultcerts = False | 19 _canloaddefaultcerts = False |
15 try: | 20 try: |
16 ssl_context = ssl.SSLContext | 21 ssl_context = ssl.SSLContext |
17 _canloaddefaultcerts = util.safehasattr(ssl_context, 'load_default_certs') | 22 _canloaddefaultcerts = util.safehasattr(ssl_context, 'load_default_certs') |