Docstring and rewrap for #1675

This commit is contained in:
Adrian Sampson 2015-11-02 16:45:45 -08:00
parent e84414c822
commit d79d11fb15

View file

@ -136,10 +136,12 @@ class EmbedCoverArtPlugin(BeetsPlugin):
self.remove_artfile(album)
def remove_artfile(self, album):
"""Possibly delete the album art file for an album (if the
appropriate configuration option is enabled.
"""
if self.config['remove_art_file'] and album.artpath:
if os.path.isfile(album.artpath):
self._log.debug(u'Removing album art file '
u'for {0}', album)
self._log.debug('Removing album art file for {0}', album)
os.remove(album.artpath)
album.artpath = None
album.store()