Remove empty values from splitString. fix #1795

This commit is contained in:
Ruud
2013-06-21 13:44:14 +02:00
parent e592eb969f
commit 171083b2f1

View File

@@ -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 [])