]> granicus.if.org Git - python/commitdiff
Make tool compatible with 2.x and 3.x.
authorGeorg Brandl <georg@python.org>
Fri, 12 Mar 2010 10:04:37 +0000 (10:04 +0000)
committerGeorg Brandl <georg@python.org>
Fri, 12 Mar 2010 10:04:37 +0000 (10:04 +0000)
Doc/tools/rstlint.py

index 8e6b3744f23a65472a8ef507e2f37db442aea317..2cc3d1277ca05849ba3d22120f080ea6fa4ac411 100755 (executable)
@@ -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()