From 171083b2f14d3f9782f53c3355a673dcfaa96178 Mon Sep 17 00:00:00 2001 From: Ruud Date: Fri, 21 Jun 2013 13:44:14 +0200 Subject: [PATCH] Remove empty values from splitString. fix #1795 --- couchpotato/core/helpers/variable.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/couchpotato/core/helpers/variable.py b/couchpotato/core/helpers/variable.py index 25def9ae..ab44655f 100644 --- a/couchpotato/core/helpers/variable.py +++ b/couchpotato/core/helpers/variable.py @@ -182,4 +182,4 @@ def randomString(size = 8, chars = string.ascii_uppercase + string.digits): return ''.join(random.choice(chars) for x in range(size)) def splitString(str, split_on = ','): - return [x.strip() for x in str.split(split_on)] if str else [] + return filter(None, [x.strip() for x in str.split(split_on)] if str else [])