Commit 420ca77e authored by Georg Brandl's avatar Georg Brandl

Make tool compatible with 2.x and 3.x.

parent 25bfc55a
...@@ -169,7 +169,6 @@ Options: -v verbose (print all checked file names) ...@@ -169,7 +169,6 @@ Options: -v verbose (print all checked file names)
return 2 return 2
count = defaultdict(int) count = defaultdict(int)
out = sys.stdout
for root, dirs, files in os.walk(path): for root, dirs, files in os.walk(path):
# ignore subdirs controlled by svn # ignore subdirs controlled by svn
...@@ -212,8 +211,7 @@ Options: -v verbose (print all checked file names) ...@@ -212,8 +211,7 @@ Options: -v verbose (print all checked file names)
csev = checker.severity csev = checker.severity
if csev >= severity: if csev >= severity:
for lno, msg in checker(fn, lines): for lno, msg in checker(fn, lines):
print('[%d] %s:%d: %s' % (csev, fn, lno, msg), print('[%d] %s:%d: %s' % (csev, fn, lno, msg))
file=out)
count[csev] += 1 count[csev] += 1
if verbose: if verbose:
print() print()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment