From 3d4e51aa1831d86e32ad716ed44fbbe75b80fed6 Mon Sep 17 00:00:00 2001 From: Binyamin Sharet Date: Fri, 19 Jul 2013 03:21:54 +0300 Subject: [PATCH] Fixed show_progress for quiet mode --- speedtest-cli | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/speedtest-cli b/speedtest-cli index 11511b8..0cdaa90 100755 --- a/speedtest-cli +++ b/speedtest-cli @@ -84,11 +84,12 @@ class FileGetter(threading.Thread): def show_progress( count, total ): - status = " %d out of %d files" % ( count, total ) - sys.stdout.write( status ) - if ( count < total ): - sys.stdout.write( '\b' * len( status ) ) - sys.stdout.flush( ) + if not quiet: + status = " %d out of %d files" % ( count, total ) + sys.stdout.write( status ) + if ( count < total ): + sys.stdout.write( '\b' * len( status ) ) + sys.stdout.flush( ) def downloadSpeed(files, quiet=False): start = time.time()