Skip to content

Commit

Permalink
the: log a debug only when text is changed
Browse files Browse the repository at this point in the history
Previously the `the` plugin would log a debug message when the text _didn't_ get changed by the plugin, whereas I think what was intended was the opposite. With this change the logged messages show the actual transformations made by the plugin.
  • Loading branch information
arcresu committed Mar 31, 2019
1 parent 728267d commit 0b4293d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion beetsplug/the.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ def the_template_func(self, text):
for p in self.patterns:
r = self.unthe(text, p)
if r != text:
self._log.debug(u'\"{0}\" -> \"{1}\"', text, r)
break
self._log.debug(u'\"{0}\" -> \"{1}\"', text, r)
return r
else:
return u''

1 comment on commit 0b4293d

@RollingStar
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

Please sign in to comment.