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

This commit is contained in:
Georg Brandl 2010-03-12 10:04:37 +00:00
parent 25bfc55afe
commit 420ca77e73

View file

@ -169,7 +169,6 @@ Options: -v verbose (print all checked file names)
return 2
count = defaultdict(int)
out = sys.stdout
for root, dirs, files in os.walk(path):
# ignore subdirs controlled by svn
@ -212,8 +211,7 @@ Options: -v verbose (print all checked file names)
csev = checker.severity
if csev >= severity:
for lno, msg in checker(fn, lines):
print('[%d] %s:%d: %s' % (csev, fn, lno, msg),
file=out)
print('[%d] %s:%d: %s' % (csev, fn, lno, msg))
count[csev] += 1
if verbose:
print()