# HG changeset patch # User Matt Mackall # Date 1319233943 18000 # Node ID 24856af7237c69e89ae2279c5ad857a2eab34674 # Parent f37b71fec6029fe0353b85e47cdc5dce8eff6cee check-code: catch BaseException and os.path.relpath diff -r f37b71fec602 -r 24856af7237c contrib/check-code.py --- a/contrib/check-code.py Fri Oct 21 16:52:16 2011 -0500 +++ b/contrib/check-code.py Fri Oct 21 16:52:23 2011 -0500 @@ -176,6 +176,8 @@ 'hasattr(foo, bar) is broken, use util.safehasattr(foo, bar) instead'), (r'opener\([^)]*\).read\(', "use opener.read() instead"), + (r'BaseException', 'not in Py2.4, use Exception'), + (r'os\.path\.relpath', 'os.path.relpath is not in Py2.5'), (r'opener\([^)]*\).write\(', "use opener.write() instead"), (r'[\s\(](open|file)\([^)]*\)\.read\(',