diff --git a/beets/ui/__init__.py b/beets/ui/__init__.py index 08ed440f5..488974dee 100644 --- a/beets/ui/__init__.py +++ b/beets/ui/__init__.py @@ -463,13 +463,15 @@ def get_replacements(): """ replacements = [] for pattern, repl in config['replace'].get(dict).items(): + repl = repl or '' try: replacements.append((re.compile(pattern), repl)) except re.error: raise UserError( u'malformed regular expression in replace: {0}'.format( pattern - )) + ) + ) return replacements def get_plugin_paths(): diff --git a/docs/changelog.rst b/docs/changelog.rst index faa1dacf1..05b77e690 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -63,11 +63,13 @@ Little fixes: Mathijs de Bruin. * The :ref:`clutter` option can now be a whitespace-separated list in addition to a YAML list. - +* Values for the :ref:`replace` option can now be empty (i.e., null is + equivalent to the empty string). .. _Acoustic Attributes: http://developer.echonest.com/acoustic-attributes.html .. _MPD: http://mpd.wikia.com/wiki/Music_Player_Daemon_Wiki + 1.3.1 (October 12, 2013) ------------------------