diff contrib/check-code.py @ 16704:1f3acc30bdfe

check-code: improve detection of naked except clauses
author Brodie Rao <brodie@sf.io>
date Sun, 13 May 2012 13:17:50 +0200
parents 1751d96d324f
children c2d9ef43ff6c
line wrap: on
line diff
--- a/contrib/check-code.py	Sun May 13 13:17:31 2012 +0200
+++ b/contrib/check-code.py	Sun May 13 13:17:50 2012 +0200
@@ -206,7 +206,7 @@
   ],
   # warnings
   [
-    (r'^\s*except:$', "warning: naked except clause"),
+    (r'^\s*except\s*:', "warning: naked except clause"),
     (r'ui\.(status|progress|write|note|warn)\([\'\"]x',
      "warning: unwrapped ui message"),
   ]