Explorar el Código

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

Guillaume Ayoub hace 14 años
padre
commit
fc166da8ba
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      radicale/__init__.py

+ 1 - 1
radicale/__init__.py

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