Merge with stable.
--- a/contrib/check-code.py Tue Nov 05 10:55:45 2013 +0100
+++ b/contrib/check-code.py Tue Nov 05 13:25:45 2013 -0500
@@ -247,7 +247,7 @@
(r'[\s\(](open|file)\([^)]*\)\.read\(',
"use util.readfile() instead"),
(r'[\s\(](open|file)\([^)]*\)\.write\(',
- "use util.readfile() instead"),
+ "use util.writefile() instead"),
(r'^[\s\(]*(open(er)?|file)\([^)]*\)',
"always assign an opened file to a variable, and close it afterwards"),
(r'[\s\(](open|file)\([^)]*\)\.',
@@ -456,6 +456,8 @@
if prelines is None:
prelines = pre.splitlines()
postlines = post.splitlines(True)
+ if i >= nerrs:
+ msg = "warning: " + msg
start = m.start()
while n < len(postlines):
@@ -482,8 +484,6 @@
bl, bu, br = blamecache[n]
if bl == l:
bd = '%s@%s' % (bu, br)
- if i >= nerrs:
- msg = "warning: " + msg
errors.append((f, lineno and n + 1, l, msg, bd))
result = False