From 2d4b91fa6d0ca348a0d05eec0295caac3c7bba0a Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Tue, 11 Dec 2012 13:09:10 -0800 Subject: [PATCH] replaygain: handle RG tool invocation errors (GC-469) --- beetsplug/replaygain.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/beetsplug/replaygain.py b/beetsplug/replaygain.py index 882032130..c84226b4c 100755 --- a/beetsplug/replaygain.py +++ b/beetsplug/replaygain.py @@ -203,7 +203,11 @@ class ReplayGainPlugin(BeetsPlugin): cmd = cmd + [syspath(i.path) for i in items] log.debug(u'replaygain: analyzing {0} files'.format(len(items))) - output = call(cmd) + try: + output = call(cmd) + except ReplayGainError as exc: + log.warn(u'replaygain: analysis failed ({0})'.format(exc)) + return log.debug(u'replaygain: analysis finished') results = parse_tool_output(output)