Update exception handling to use `except X as Y` syntax.
[update-copyright.git] / update_copyright / utils.py
index f20c301fa60ad6eaada85e6353cf1871cd6ea6c6..117235149b469d0cb992e6c64dad59d5ee402e19 100644 (file)
@@ -128,11 +128,11 @@ def copyright_string(original_year, final_year, authors, text, info={},
     for i,paragraph in enumerate(text):
         try:
             text[i] = paragraph % info
-        except ValueError, e:
+        except ValueError as e:
             _LOG.error(
                 "{}: can't format {} with {}".format(e, paragraph, info))
             raise
-        except TypeError, e:
+        except TypeError as e:
             _LOG.error(
                 ('{}: copright text must be a list of paragraph strings, '
                  'not {}').format(e, repr(text)))