Assume empty files are unencrypted.

This commit is contained in:
Michael DeHaan 2014-02-21 21:06:04 -05:00
parent 719367facb
commit 9686695170

View file

@ -51,7 +51,11 @@ def is_encrypted(filename):
# read first line of the file
with open(filename) as f:
try:
head = f.next()
except StopIteration:
# empty file, so not encrypted
return False
if head.startswith(HEADER):
return True