From aef0941e1885e5c41d380cad22520c543bbb5896 Mon Sep 17 00:00:00 2001 From: Olli Suutari Date: Mon, 17 Oct 2016 22:42:07 +0300 Subject: [PATCH] - Modified the def create_separated_list by suggestions of TRB143 --- openlp/core/lib/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/openlp/core/lib/__init__.py b/openlp/core/lib/__init__.py index be92d2d49..69c3d30b3 100644 --- a/openlp/core/lib/__init__.py +++ b/openlp/core/lib/__init__.py @@ -318,15 +318,15 @@ def create_separated_list(string_list): """ list_length = len(string_list) if list_length == 1: - return_list = string_list[0] + list_to_string = string_list[0] elif list_length == 2: - return_list = translate('OpenLP.core.lib', '{one} and {two}').format(one=string_list[0], two=string_list[1]) + list_to_string = translate('OpenLP.core.lib', '{one} and {two}').format(one=string_list[0], two=string_list[1]) elif list_length > 2: - return_list = translate('OpenLP.core.lib', '{first}, and {last}').format(first=', '.join(string_list[:-1]), + list_to_string = translate('OpenLP.core.lib', '{first}, and {last}').format(first=', '.join(string_list[:-1]), last=string_list[-1]) else: - return_list = "" - return return_list + list_to_string = '' + return list_to_string from .exceptions import ValidationError