scrub: handle IOError

Mutagen can raise this error when trying to truncate a file.
This commit is contained in:
Adrian Sampson 2013-06-10 16:06:43 -07:00
parent b1ea90a724
commit 2f053b0ecd
2 changed files with 6 additions and 0 deletions

View file

@ -108,6 +108,11 @@ def _scrub(path):
# remove them. In this case, we just remove all the tags.
for tag in f.keys():
del f[tag]
except IOError as exc:
log.error(u'could not scrub {0}: {1}'.format(
util.displayable_path(path),
exc,
))
f.save()
# Automatically embed art into imported albums.

View file

@ -36,6 +36,7 @@ And some bug fixes:
Intzoglou.
* Fix an occasional crash in the :doc:`/plugins/beatport` when a length
field was missing from the API response. Thanks to Timothy Appnel.
* :doc:`/plugins/scrub`: Handle and log I/O errors.
1.2.0 (June 5, 2013)