Parcourir la source

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

Guillaume Ayoub il y a 14 ans
Parent
commit
fc166da8ba
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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))