summaryrefslogtreecommitdiff
path: root/suspicious
diff options
context:
space:
mode:
authorDaniel Gnoutcheff <gnoutchd@softwarefreedom.org>2016-06-29 17:03:00 -0400
committerDaniel Gnoutcheff <gnoutchd@softwarefreedom.org>2016-06-29 17:03:00 -0400
commit4d4dbed2737a54ccabaa40f829c0c2a93fbe9750 (patch)
treebc61c5d86396865beaf7860499a99c906cb0d4d5 /suspicious
parent4c86254bd0af752727e56ff984d189064ccf2a88 (diff)
Progress text fixes
Diffstat (limited to 'suspicious')
-rwxr-xr-xsuspicious8
1 files changed, 4 insertions, 4 deletions
diff --git a/suspicious b/suspicious
index 9f6e6ea..fe09204 100755
--- a/suspicious
+++ b/suspicious
@@ -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: