contrib/check-code.py
changeset 18180 c582a71457e5
parent 18055 e440a2c0d944
child 18183 e1caaeb5a2ed
--- a/contrib/check-code.py	Tue Jan 01 13:25:07 2013 -0600
+++ b/contrib/check-code.py	Tue Jan 01 12:58:21 2013 -0600
@@ -185,6 +185,8 @@
     (r'[^^+=*/!<>&| %-](\s=|=\s)[^= ]',
      "wrong whitespace around ="),
     (r'raise Exception', "don't raise generic exceptions"),
+    (r'raise [^,(]+, (\([^\)]+\)|[^,\(\)]+)$',
+     "don't use old-style two-argument raise, use Exception(message)"),
     (r' is\s+(not\s+)?["\'0-9-]', "object comparison with literal"),
     (r' [=!]=\s+(True|False|None)',
      "comparison with singleton, use 'is' or 'is not' instead"),