Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7a8e260

Browse files
committedMar 9, 2016
handle filter failures in binary files
1 parent 6e22244 commit 7a8e260

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed
 

‎nikola/filters.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,11 @@ def f_in_file(fname):
5757
with open(fname, 'rb') as inf:
5858
data = inf.read()
5959
data = f(data)
60-
with open(fname, 'wb+') as outf:
61-
outf.write(data)
60+
if data is not False:
61+
with open(fname, 'wb+') as outf:
62+
outf.write(data)
63+
else:
64+
return False
6265

6366
return f_in_file
6467

0 commit comments

Comments
 (0)
Please sign in to comment.