Use the "as" keyword for exception mathing in a try/except block

This commit is contained in:
Guillaume Ayoub 2011-10-04 06:34:46 +02:00
parent 3689944372
commit fc166da8ba

View File

@ -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))