comparison contrib/check-code.py @ 25010:ded7302e1c83

check-code: drop the python 2.5 warning for os.path.relpath() There's plenty of other cleanup to do in here, but this specific one is used in the next patch.
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 11 May 2015 22:47:01 -0400
parents 1f9127c9239b
children 62c2786b4327
comparison
equal deleted inserted replaced
25009:e1fb276d4619 25010:ded7302e1c83
279 (r'(?:(?<!def)\s+|\()hasattr', 279 (r'(?:(?<!def)\s+|\()hasattr',
280 'hasattr(foo, bar) is broken, use util.safehasattr(foo, bar) instead'), 280 'hasattr(foo, bar) is broken, use util.safehasattr(foo, bar) instead'),
281 (r'opener\([^)]*\).read\(', 281 (r'opener\([^)]*\).read\(',
282 "use opener.read() instead"), 282 "use opener.read() instead"),
283 (r'BaseException', 'not in Python 2.4, use Exception'), 283 (r'BaseException', 'not in Python 2.4, use Exception'),
284 (r'os\.path\.relpath', 'os.path.relpath is not in Python 2.5'),
285 (r'opener\([^)]*\).write\(', 284 (r'opener\([^)]*\).write\(',
286 "use opener.write() instead"), 285 "use opener.write() instead"),
287 (r'[\s\(](open|file)\([^)]*\)\.read\(', 286 (r'[\s\(](open|file)\([^)]*\)\.read\(',
288 "use util.readfile() instead"), 287 "use util.readfile() instead"),
289 (r'[\s\(](open|file)\([^)]*\)\.write\(', 288 (r'[\s\(](open|file)\([^)]*\)\.write\(',