summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsuspicious5
1 files changed, 4 insertions, 1 deletions
diff --git a/suspicious b/suspicious
index dedf43f..178ae4b 100755
--- a/suspicious
+++ b/suspicious
@@ -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: