wafsamba: ensure TO_LIST does not fail with empty string
authorAlexander Bokovoy <ab@samba.org>
Mon, 21 May 2012 15:38:56 +0000 (18:38 +0300)
committerAlexander Bokovoy <ab@samba.org>
Wed, 23 May 2012 14:51:50 +0000 (17:51 +0300)
buildtools/wafsamba/samba_utils.py

index 70d06704e74c071114ecb343ad4428407cfc004e..c252663b93588ecd82ce1719b4ceecca2a35bd66 100644 (file)
@@ -215,6 +215,8 @@ def TO_LIST(str, delimiter=None):
         return []
     if isinstance(str, list):
         return str
+    if len(str) == 0:
+        return []
     lst = str.split(delimiter)
     # the string may have had quotes in it, now we
     # check if we did have quotes, and use the slower shlex