Commit 96866951 by Michael DeHaan

Assume empty files are unencrypted.

parent 719367fa
......@@ -51,7 +51,11 @@ def is_encrypted(filename):
# read first line of the file
with open(filename) as f:
head = f.next()
try:
head = f.next()
except StopIteration:
# empty file, so not encrypted
return False
if head.startswith(HEADER):
return True
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment