Checker percentage calc was wrong, also cleanup

This commit is contained in:
Campbell Barton
2014-03-29 11:25:44 +11:00
parent 3eb2724c14
commit b64bdb2c1b
5 changed files with 40 additions and 40 deletions

View File

@@ -70,7 +70,7 @@ def main():
def my_process(i, c, cmd): def my_process(i, c, cmd):
if not USE_QUIET: if not USE_QUIET:
percent = 100.0 * (i / (len(check_commands) - 1)) percent = 100.0 * (i / len(check_commands))
percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:" percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:"
sys.stdout.flush() sys.stdout.flush()

View File

@@ -61,7 +61,7 @@ def main():
def my_process(i, c, cmd): def my_process(i, c, cmd):
if not USE_QUIET: if not USE_QUIET:
percent = 100.0 * (i / (len(check_commands) - 1)) percent = 100.0 * (i / len(check_commands))
percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:" percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:"
sys.stdout.flush() sys.stdout.flush()

View File

@@ -59,7 +59,7 @@ def main():
def my_process(i, c, cmd): def my_process(i, c, cmd):
if not USE_QUIET: if not USE_QUIET:
percent = 100.0 * (i / (len(check_commands) - 1)) percent = 100.0 * (i / len(check_commands))
percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:" percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:"
sys.stdout.flush() sys.stdout.flush()

View File

@@ -89,7 +89,7 @@ def main():
def my_process(i, c, cmd): def my_process(i, c, cmd):
if not USE_QUIET: if not USE_QUIET:
percent = 100.0 * (i / (len(check_commands) - 1)) percent = 100.0 * (i / len(check_commands))
percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:" percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:"
sys.stdout.write("%s %s\n" % (percent_str, c)) sys.stdout.write("%s %s\n" % (percent_str, c))