contrib/check-code.py
changeset 32418 1651977596c0
parent 32293 ca727147ff9f
child 32604 071423d0a584
--- a/contrib/check-code.py	Mon May 22 01:17:49 2017 -0700
+++ b/contrib/check-code.py	Sun May 21 13:34:42 2017 -0700
@@ -300,7 +300,8 @@
     (r'^\s*(while|if) [01]:',
      "use True/False for constant Boolean expression"),
     (r'(?:(?<!def)\s+|\()hasattr\(',
-     'hasattr(foo, bar) is broken, use util.safehasattr(foo, bar) instead'),
+     'hasattr(foo, bar) is broken on py2, use util.safehasattr(foo, bar) '
+     'instead', r'#.*hasattr-py3-only'),
     (r'opener\([^)]*\).read\(',
      "use opener.read() instead"),
     (r'opener\([^)]*\).write\(',