@staticmethod<EOL><INDENT>def validate_string_list(value):<DEDENT>
try:<EOL><INDENT>if sys.version_info.major < <NUM_LIT:3>:<EOL><INDENT>from locale import getpreferredencoding<EOL>encoding = getpreferredencoding()<EOL>value = value.decode(encoding)<EOL><DEDENT>return [x.strip() for x in value.split(u"<STR_LIT:U+002C>")]<EOL><DEDENT>except (AttributeError, TypeError, UnicodeError):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>
Validator for string lists to be used with `add_setting`.