Ignore empty string metadata. Fixes #1469.

This commit is contained in:
Forest 2014-09-29 22:51:13 -07:00
commit 55c2fcb2d5

View file

@ -460,6 +460,10 @@ class Readers(FileStampDataCacher):
self.cache_data(path, (content, reader_metadata))
metadata.update(reader_metadata)
# remove any empty metadata
metadata = {key: value for key, value in metadata.items()
if value or isinstance(value, (int, bool, float))}
if content:
# find images with empty alt
find_empty_alt(content, path)