Use the "as" keyword for exception mathing in a try/except block
This commit is contained in:
parent
3689944372
commit
fc166da8ba
@ -84,7 +84,7 @@ class HTTPSServer(HTTPServer):
|
||||
filename = config.get("server", name)
|
||||
try:
|
||||
open(filename, "r").close()
|
||||
except IOError, (_, message):
|
||||
except IOError as (_, message):
|
||||
log.LOGGER.warn(
|
||||
"Error while reading SSL %s %r: %s" % (
|
||||
name, filename, message))
|
||||
|
Loading…
x
Reference in New Issue
Block a user