diff options
Diffstat (limited to 'heat/engine/hot/functions.py')
-rw-r--r-- | heat/engine/hot/functions.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/heat/engine/hot/functions.py b/heat/engine/hot/functions.py index cf4eaa0f5..2575264c9 100644 --- a/heat/engine/hot/functions.py +++ b/heat/engine/hot/functions.py @@ -1603,12 +1603,14 @@ class ListConcat(function.Function): for m in args: ret_list.extend(ensure_list(m)) - if self._unique: - for i in ret_list: - while ret_list.count(i) > 1: - del ret_list[ret_list.index(i)] - - return ret_list + if not self._unique: + return ret_list + + unique_list = [] + for item in ret_list: + if item not in unique_list: + unique_list.append(item) + return unique_list class ListConcatUnique(ListConcat): |