check-code: improve detection of naked except clauses
authorBrodie Rao <brodie@sf.io>
Sun, 13 May 2012 13:17:50 +0200
changeset 16704 1f3acc30bdfe
parent 16703 7292a4618f46
child 16705 c2d9ef43ff6c
check-code: improve detection of naked except clauses
contrib/check-code.py
--- 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"),
   ]