diff --git a/contrib/check-code.py b/contrib/check-code.py --- a/contrib/check-code.py +++ b/contrib/check-code.py @@ -281,6 +281,8 @@ pypats = [ (r'\.debug\(\_', "don't mark debug messages for translation"), (r'\.strip\(\)\.split\(\)', "no need to strip before splitting"), (r'^\s*except\s*:', "naked except clause", r'#.*re-raises'), + (r'^\s*except\s([^\(,]+|\([^\)]+\))\s*,', + 'legacy exception syntax; use "as" instead of ","'), (r':\n( )*( ){1,3}[^ ]', "must indent 4 spaces"), (r'ui\.(status|progress|write|note|warn)\([\'\"]x', "missing _() in ui message (use () to hide false-positives)"),