[bitbake-devel] [PATCH 08/14] toaster: catch IndexError error in dictionary lookups
Alex DAMIAN
alexandru.damian at intel.com
Fri Apr 4 14:10:47 UTC 2014
From: David Reyna <David.Reyna at windriver.com>
In the get_dict_value filter, there is the edge case where halted
builds can lead to IndexError errors in dictionary lookups, so we
need to catch those.
[YOCTO #6067]
Signed-off-by: David Reyna <David.Reyna at windriver.com>
---
lib/toaster/toastergui/templatetags/projecttags.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/toaster/toastergui/templatetags/projecttags.py b/lib/toaster/toastergui/templatetags/projecttags.py
index 3dd0f3d..ee08ab7 100644
--- a/lib/toaster/toastergui/templatetags/projecttags.py
+++ b/lib/toaster/toastergui/templatetags/projecttags.py
@@ -247,5 +247,5 @@ def get_dict_value(dictionary, key):
"""
try:
return dictionary[key]
- except KeyError:
+ except (KeyError, IndexError):
return ''
--
1.9.1
More information about the bitbake-devel
mailing list