diff options
author | David Reyna <David.Reyna@windriver.com> | 2014-04-08 16:25:44 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-04-09 17:00:01 +0100 |
commit | 74e2f8501997143162855b970ffd9fdb33d24bd8 (patch) | |
tree | cc764fc756ef3fb7eb50f64ededa06dc252910b1 /bitbake/lib/toaster/toastergui/templatetags/projecttags.py | |
parent | f88a3437734f4f6559d391415089bf571152f63d (diff) | |
download | poky-74e2f8501997143162855b970ffd9fdb33d24bd8.tar.gz |
bitbake: toaster: regex alternation filter caused django error
The combination of a regex filter specification that uses alternate,
plus a search string, plus multiple search_allowed_fields, leads to
a Django fatal error. Replace this regex filter for variables in
local files with a simpler 'contains' against the project's directory
plus a '/conf/' string.
Alex rebased this on top of fix for #6048.
[YOCTO #5962]
(Bitbake rev: fd57128dc3a35ca87031f3df1a531a085e89baf0)
Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templatetags/projecttags.py')
-rw-r--r-- | bitbake/lib/toaster/toastergui/templatetags/projecttags.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py index aa1ebf8017..e8634574c0 100644 --- a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py +++ b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py | |||
@@ -163,7 +163,7 @@ def filter_setin_files(file_list,matchstr): | |||
163 | # match only filters | 163 | # match only filters |
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 re.search(filter, file_list[i].file_name): |
167 | if htmlstr.find(file_list[i].file_name + "<p>") < 0: | 167 | if htmlstr.find(file_list[i].file_name + "<p>") < 0: |
168 | htmlstr += file_list[i].file_name + "<p>" | 168 | htmlstr += file_list[i].file_name + "<p>" |
169 | return htmlstr | 169 | return htmlstr |
@@ -171,7 +171,7 @@ def filter_setin_files(file_list,matchstr): | |||
171 | # match only search string, plus always last file | 171 | # match only search string, plus always last file |
172 | if filter == "": | 172 | if filter == "": |
173 | for i in range(len(file_list)-1): | 173 | for i in range(len(file_list)-1): |
174 | if file_list[i].file_name.find(search) >= 0: | 174 | if re.search(search,file_list[i].file_name): |
175 | if htmlstr.find(file_list[i].file_name + "<p>") < 0: | 175 | if htmlstr.find(file_list[i].file_name + "<p>") < 0: |
176 | htmlstr += file_list[i].file_name + "<p>" | 176 | htmlstr += file_list[i].file_name + "<p>" |
177 | if htmlstr.find(file_list[len(file_list)-1].file_name) < 0: | 177 | if htmlstr.find(file_list[len(file_list)-1].file_name) < 0: |
@@ -180,7 +180,7 @@ def filter_setin_files(file_list,matchstr): | |||
180 | 180 | ||
181 | # match filter or search string | 181 | # match filter or search string |
182 | for i in range(len(file_list)): | 182 | for i in range(len(file_list)): |
183 | if (file_list[i].file_name.find(filter) >= 0) or (file_list[i].file_name.find(search) >= 0): | 183 | if re.search(filter, file_list[i].file_name) or re.search(search,file_list[i].file_name): |
184 | if htmlstr.find(file_list[i].file_name + "<p>") < 0: | 184 | if htmlstr.find(file_list[i].file_name + "<p>") < 0: |
185 | htmlstr += file_list[i].file_name + "<p>" | 185 | htmlstr += file_list[i].file_name + "<p>" |
186 | return htmlstr | 186 | return htmlstr |