summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/toaster/toastergui/templatetags/projecttags.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
index ee08ab74a9..aa1ebf8017 100644
--- a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
+++ b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
@@ -164,21 +164,25 @@ def filter_setin_files(file_list,matchstr):
164 if search == '': 164 if search == '':
165 for i in range(len(file_list)): 165 for i in range(len(file_list)):
166 if file_list[i].file_name.find(filter) >= 0: 166 if file_list[i].file_name.find(filter) >= 0:
167 htmlstr += file_list[i].file_name + "<p>" 167 if htmlstr.find(file_list[i].file_name + "<p>") < 0:
168 htmlstr += file_list[i].file_name + "<p>"
168 return htmlstr 169 return htmlstr
169 170
170 # match only search string, plus always last file 171 # match only search string, plus always last file
171 if filter == "": 172 if filter == "":
172 for i in range(len(file_list)-1): 173 for i in range(len(file_list)-1):
173 if file_list[i].file_name.find(search) >= 0: 174 if file_list[i].file_name.find(search) >= 0:
174 htmlstr += file_list[i].file_name + "<p>" 175 if htmlstr.find(file_list[i].file_name + "<p>") < 0:
175 htmlstr += file_list[len(file_list)-1].file_name 176 htmlstr += file_list[i].file_name + "<p>"
177 if htmlstr.find(file_list[len(file_list)-1].file_name) < 0:
178 htmlstr += file_list[len(file_list)-1].file_name
176 return htmlstr 179 return htmlstr
177 180
178 # match filter or search string 181 # match filter or search string
179 for i in range(len(file_list)): 182 for i in range(len(file_list)):
180 if (file_list[i].file_name.find(filter) >= 0) or (file_list[i].file_name.find(search) >= 0): 183 if (file_list[i].file_name.find(filter) >= 0) or (file_list[i].file_name.find(search) >= 0):
181 htmlstr += file_list[i].file_name + "<p>" 184 if htmlstr.find(file_list[i].file_name + "<p>") < 0:
185 htmlstr += file_list[i].file_name + "<p>"
182 return htmlstr 186 return htmlstr
183 187
184 188