From: Sebastian Spaeth Date: Wed, 14 Nov 2012 07:54:48 +0000 (+0100) Subject: Slightly shorten the media_tags_as_string function X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=2a6a3b8cce82ab0139f37a1ff8769e24593537b6;p=mediagoblin.git Slightly shorten the media_tags_as_string function Signed-off-by: Sebastian Spaeth --- diff --git a/mediagoblin/tools/text.py b/mediagoblin/tools/text.py index 09d172a6..24a4d282 100644 --- a/mediagoblin/tools/text.py +++ b/mediagoblin/tools/text.py @@ -83,12 +83,10 @@ def media_tags_as_string(media_entry_tags): This is the opposite of convert_to_tag_list_of_dicts """ - media_tag_string = '' + tags_string = '' if media_entry_tags: - media_tag_string = u', '.join( - [tag['name'] - for tag in media_entry_tags]) - return media_tag_string + tags_string = u', '.join([tag['name'] for tag in media_entry_tags]) + return tags_string TOO_LONG_TAG_WARNING = \