From 1448eab642d9cdcc38ca17fdd6d0d1313cd0ba59 Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Tue, 2 Dec 2014 18:12:21 -0800 Subject: [PATCH] Parenetheses-less tuples --- beetsplug/echonest.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/beetsplug/echonest.py b/beetsplug/echonest.py index a3cf9495a..db440a44a 100644 --- a/beetsplug/echonest.py +++ b/beetsplug/echonest.py @@ -258,9 +258,11 @@ class EchonestMetadataPlugin(plugins.BeetsPlugin): """Truncate and convert an item's audio file so it can be uploaded to echonest. - Returns a ``(source, tmp)`` tuple where `source` is the path to + Return a ``(source, tmp)`` tuple where `source` is the path to the file to be uploaded and `tmp` is a temporary file to be deleted after the upload or `None`. + + If conversion or truncation fails, return `None`. """ source = item.path tmp = None @@ -280,7 +282,7 @@ class EchonestMetadataPlugin(plugins.BeetsPlugin): return if source: - return (source, tmp) + return source, tmp def convert(self, source): """Converts an item in an unsupported media format to ogg. Config @@ -350,7 +352,7 @@ class EchonestMetadataPlugin(plugins.BeetsPlugin): log.debug(u'echonest: could not prepare file for upload') return - (source, tmp) = prepared + source, tmp = prepared log.info(u'echonest: uploading file, please be patient') track = self._echofun(pyechonest.track.track_from_filename, filename=source)