Mercurial > hg > mercurial-source
changeset 23837:b2358bc1407c
hghave: we now support Python 2.7.9's ssl for https
author | Augie Fackler <augie@google.com> |
---|---|
date | Tue, 13 Jan 2015 15:08:55 -0500 |
parents | e278fc8bb0c3 |
children | 4982fade9733 |
files | tests/hghave.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/hghave.py +++ b/tests/hghave.py @@ -307,11 +307,13 @@ return not matchoutput('hg root 2>&1', r'abort: no repository found', True) -@check("ssl", "python >= 2.6 ssl module and python OpenSSL") +@check("ssl", ("(python >= 2.6 ssl module and python OpenSSL) " + "OR python >= 2.7.9 ssl")) def has_ssl(): try: import ssl - ssl.wrap_socket # silence unused import warning + if getattr(ssl, 'create_default_context', False): + return True import OpenSSL OpenSSL.SSL.Context return True