for utility checkers, use QUIET env var, not to print progress.

This commit is contained in:
2012-11-07 01:00:27 +00:00
parent 0890c2a4a0
commit 5cf9d5e4ca
5 changed files with 37 additions and 20 deletions

View File

@@ -27,6 +27,8 @@ import subprocess
import sys
import os
USE_QUIET = (os.environ.get("QUIET", None) is not None)
CHECKER_IGNORE_PREFIX = [
"extern",
"intern/moto",
@@ -62,11 +64,12 @@ def main():
process_functions = []
def my_process(i, c, cmd):
percent = 100.0 * (i / (len(check_commands) - 1))
percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:"
if not USE_QUIET:
percent = 100.0 * (i / (len(check_commands) - 1))
percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:"
sys.stdout.flush()
sys.stdout.write("%s " % percent_str)
sys.stdout.flush()
sys.stdout.write("%s " % percent_str)
return subprocess.Popen(cmd)