diff options
author | Daniel Gnoutcheff <gnoutchd@softwarefreedom.org> | 2016-07-14 15:01:38 -0400 |
---|---|---|
committer | Daniel Gnoutcheff <gnoutchd@softwarefreedom.org> | 2016-07-14 15:01:38 -0400 |
commit | 3969154e6c497dde2897e9c65a9e1d078c534370 (patch) | |
tree | 86891e95690796defce9b9fd5c85f85a2c20b9fd /suspicious | |
parent | 49e9ddf62971fc0073fec428b7b75569e2860cbc (diff) |
Minor fixes
- Last bit of status text should got to stderr, too.
- Log I/O error instead of crashing.
Diffstat (limited to 'suspicious')
-rwxr-xr-x | suspicious | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -323,6 +323,9 @@ for file in filelist: except UnicodeDecodeError: print("possible binary: " + file) continue + except OSError: + print("read error: " + file) + continue datasize += len(filecontents) filenamescore = scoretext(wordlist, file, options.maxwholewordlength) filecontentsscore = scoretext(wordlist, filecontents, options.maxwholewordlength) @@ -332,7 +335,7 @@ for file in filelist: #Clear screen of proggress text now that finished scoring file if options.display_progress: - print('\r' + " " * len(progresstext) + '\r', end='') + print('\r' + " " * len(progresstext) + '\r', end='', file=sys.stderr) #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: |