Use cross-platform home directory path

This commit is contained in:
Joffrey F 2015-08-26 17:02:24 -07:00
parent c56c9faacd
commit e8af8b376d
1 changed files with 2 additions and 3 deletions

View File

@ -369,8 +369,7 @@ def kwargs_from_env(ssl_version=None, assert_hostname=None):
if tls_verify else host) if tls_verify else host)
if tls_verify and not cert_path: if tls_verify and not cert_path:
if 'HOME' in os.environ: cert_path = os.path.join(os.path.expanduser('~'), '.docker')
cert_path = os.path.join(os.environ['HOME'], '.docker')
if tls_verify and cert_path: if tls_verify and cert_path:
params['tls'] = tls.TLSConfig( params['tls'] = tls.TLSConfig(