diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-11-07 05:00:27 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-11-07 05:00:27 +0400 |
commit | 5cf9d5e4ca28c01420adbceae0e9989651754470 (patch) | |
tree | c2d1e2bcb03af99bf7f330af48b2a77bc42acd3d /build_files/cmake/cmake_static_check_splint.py | |
parent | 0890c2a4a021e7d5951abb0a7ebe138ed24ae28a (diff) |
for utility checkers, use QUIET env var, not to print progress.
Diffstat (limited to 'build_files/cmake/cmake_static_check_splint.py')
-rw-r--r-- | build_files/cmake/cmake_static_check_splint.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/build_files/cmake/cmake_static_check_splint.py b/build_files/cmake/cmake_static_check_splint.py index 7be28c01af8..d3f22191021 100644 --- a/build_files/cmake/cmake_static_check_splint.py +++ b/build_files/cmake/cmake_static_check_splint.py @@ -68,6 +68,9 @@ CHECKER_ARGS = [ import project_source_info import subprocess import sys +import os + +USE_QUIET = (os.environ.get("QUIET", None) is not None) def main(): @@ -85,11 +88,12 @@ def main(): check_commands.append((c, cmd)) 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.write("%s %s\n" % (percent_str, c)) - sys.stdout.flush() + sys.stdout.write("%s %s\n" % (percent_str, c)) + sys.stdout.flush() return subprocess.Popen(cmd) |