Mercurial > public > mercurial-scm > hg
diff mercurial/sslutil.py @ 31074:2912b06905dc
py3: use pycompat.fsencode() to convert __file__ to bytes
__file__ returns unicodes on Python 3. This patch uses pycompat.fsencode() to
convert them to bytes.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Mon, 20 Feb 2017 18:40:42 +0530 |
parents | 10b17ed9b591 |
children | f819aa9dbbf9 |
line wrap: on
line diff
--- a/mercurial/sslutil.py Wed Feb 22 10:14:18 2017 -0800 +++ b/mercurial/sslutil.py Mon Feb 20 18:40:42 2017 +0530 @@ -720,7 +720,8 @@ # to load the system CA store. If we're running on Apple Python, use this # trick. if _plainapplepython(): - dummycert = os.path.join(os.path.dirname(__file__), 'dummycert.pem') + dummycert = os.path.join( + os.path.dirname(pycompat.fsencode(__file__)), 'dummycert.pem') if os.path.exists(dummycert): return dummycert