Fixed show_progress for quiet mode

This commit is contained in:
Binyamin Sharet 2013-07-19 03:21:54 +03:00
parent ae86d50d68
commit 3d4e51aa18
1 changed files with 6 additions and 5 deletions

View File

@ -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()