Catch the exception instead of (errno, message)
This commit is contained in:
parent
fc166da8ba
commit
0cdc5b06da
@ -84,10 +84,10 @@ class HTTPSServer(HTTPServer):
|
|||||||
filename = config.get("server", name)
|
filename = config.get("server", name)
|
||||||
try:
|
try:
|
||||||
open(filename, "r").close()
|
open(filename, "r").close()
|
||||||
except IOError as (_, message):
|
except IOError as exception:
|
||||||
log.LOGGER.warn(
|
log.LOGGER.warn(
|
||||||
"Error while reading SSL %s %r: %s" % (
|
"Error while reading SSL %s %r: %s" % (
|
||||||
name, filename, message))
|
name, filename, exception))
|
||||||
|
|
||||||
self.socket = ssl.wrap_socket(
|
self.socket = ssl.wrap_socket(
|
||||||
self.socket,
|
self.socket,
|
||||||
|
Loading…
Reference in New Issue
Block a user