summaryrefslogtreecommitdiff
path: root/buildtools
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2015-01-07 09:41:02 +0100
committerJeremy Allison <jra@samba.org>2015-01-08 23:38:06 +0100
commitab4b988ba2ba85ec2bfb01d7711d6870b3e0f710 (patch)
treedcd9c79290f9f35944e9dc7fdad55c288f10dc61 /buildtools
parent56e2384dfe29fd8f16b9d0cf7264f9bb8ed38966 (diff)
downloadsamba-ab4b988ba2ba85ec2bfb01d7711d6870b3e0f710.tar.gz
wafsamba: let TO_LIST(mylist) return a copy of mylist
In most cases we have TO_LIST(mystring) which returns an independent list. newlist = TO_LIST(mylist) returned just a reference to mylist. Which means newlist.append("end") would also modify mylist. TO_LIST() should always return an independent list. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'buildtools')
-rw-r--r--buildtools/wafsamba/samba_utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py
index 0b0bb483781..9ac10666f39 100644
--- a/buildtools/wafsamba/samba_utils.py
+++ b/buildtools/wafsamba/samba_utils.py
@@ -214,7 +214,8 @@ def TO_LIST(str, delimiter=None):
if str is None:
return []
if isinstance(str, list):
- return str
+ # we need to return a new independent list...
+ return list(str)
if len(str) == 0:
return []
lst = str.split(delimiter)