diff options
author | Daniel Gnoutcheff <gnoutchd@softwarefreedom.org> | 2016-06-29 17:03:00 -0400 |
---|---|---|
committer | Daniel Gnoutcheff <gnoutchd@softwarefreedom.org> | 2016-06-29 17:03:00 -0400 |
commit | 4d4dbed2737a54ccabaa40f829c0c2a93fbe9750 (patch) | |
tree | bc61c5d86396865beaf7860499a99c906cb0d4d5 /suspicious | |
parent | 4c86254bd0af752727e56ff984d189064ccf2a88 (diff) |
Progress text fixes
Diffstat (limited to 'suspicious')
-rwxr-xr-x | suspicious | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -304,13 +304,13 @@ for file in filelist: now = datetime.datetime.now() estimate = (((now - start) / (opened + skipped)) * len(filelist)) if options.display_progress: - if len(file)> 60: + if len(file)> 50: prog_file = file.split('/')[0] + "/.../" + file.split('/')[-1] else: prog_file = file - print('\r' + " " * len(progresstext) + '\r') + print('\r' + " " * len(progresstext) + '\r', end='', file=sys.stderr) progresstext = str(((opened + skipped)*1.0/len(filelist))*100)[:5] + '% '+ " time left:" + str(estimate).split('.')[0] + ' ' + prog_file + '\r' - print(progresstext) + print(progresstext, end='', file=sys.stderr) sys.stdout.flush() filecontents = f.read() datasize += len(filecontents) @@ -322,7 +322,7 @@ for file in filelist: #Clear screen of proggress text now that finished scoring file if options.display_progress: - print('\r' + " " * len(progresstext) + '\r') + print('\r' + " " * len(progresstext) + '\r', end='') #Save summary as a file, but if the filename exists do not overwrite, append a number if options.summaryfile and len(filelist) > 0 and not options.displaysummary: |