Merge "Fix incorrect string formatting in the SSL code"
This commit is contained in:
commit
3cf7c658c7
|
@ -380,8 +380,8 @@ def create_ssl_context():
|
||||||
|
|
||||||
if sys.version_info < MIN_VERSION:
|
if sys.version_info < MIN_VERSION:
|
||||||
LOG.warning(_LW('Unable to use SSL in this version of Python: '
|
LOG.warning(_LW('Unable to use SSL in this version of Python: '
|
||||||
'%{current}, please ensure your version of Python is '
|
'%(current)s, please ensure your version of Python is '
|
||||||
'greater than %{min} to enable this feature.'),
|
'greater than %(min)s to enable this feature.'),
|
||||||
{'current': '.'.join(map(str, sys.version_info[:3])),
|
{'current': '.'.join(map(str, sys.version_info[:3])),
|
||||||
'min': '.'.join(map(str, MIN_VERSION))})
|
'min': '.'.join(map(str, MIN_VERSION))})
|
||||||
return
|
return
|
||||||
|
@ -392,8 +392,8 @@ def create_ssl_context():
|
||||||
context.load_cert_chain(CONF.ssl_cert_path, CONF.ssl_key_path)
|
context.load_cert_chain(CONF.ssl_cert_path, CONF.ssl_key_path)
|
||||||
except IOError as exc:
|
except IOError as exc:
|
||||||
LOG.warning(_LW('Failed to load certificate or key from defined '
|
LOG.warning(_LW('Failed to load certificate or key from defined '
|
||||||
'locations: %{cert} and %{key}, will continue to '
|
'locations: %(cert)s and %(key)s, will continue '
|
||||||
'run with the default settings: %{exc}'),
|
'to run with the default settings: %(exc)s'),
|
||||||
{'cert': CONF.ssl_cert_path, 'key': CONF.ssl_key_path,
|
{'cert': CONF.ssl_cert_path, 'key': CONF.ssl_key_path,
|
||||||
'exc': exc})
|
'exc': exc})
|
||||||
except ssl.SSLError as exc:
|
except ssl.SSLError as exc:
|
||||||
|
|
Loading…
Reference in New Issue