summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/ui/crumbs/hoblistmodel.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hoblistmodel.py b/bitbake/lib/bb/ui/crumbs/hoblistmodel.py
index b4d2a621b7..79e909c7f1 100644
--- a/bitbake/lib/bb/ui/crumbs/hoblistmodel.py
+++ b/bitbake/lib/bb/ui/crumbs/hoblistmodel.py
@@ -199,7 +199,9 @@ class PackageListModel(gtk.ListStore):
199 return self.cmp_vals(val1, val2, user_data) 199 return self.cmp_vals(val1, val2, user_data)
200 200
201 def cmp_vals(self, val1, val2, user_data): 201 def cmp_vals(self, val1, val2, user_data):
202 if val1.startswith(user_data) and not val2.startswith(user_data): 202 if val1 is None or val2 is None:
203 return 0
204 elif val1.startswith(user_data) and not val2.startswith(user_data):
203 return -1 205 return -1
204 elif not val1.startswith(user_data) and val2.startswith(user_data): 206 elif not val1.startswith(user_data) and val2.startswith(user_data):
205 return 1 207 return 1
@@ -575,7 +577,9 @@ class RecipeListModel(gtk.ListStore):
575 return self.cmp_vals(val1, val2, user_data) 577 return self.cmp_vals(val1, val2, user_data)
576 578
577 def cmp_vals(self, val1, val2, user_data): 579 def cmp_vals(self, val1, val2, user_data):
578 if val1.startswith(user_data) and not val2.startswith(user_data): 580 if val1 is None or val2 is None:
581 return 0
582 elif val1.startswith(user_data) and not val2.startswith(user_data):
579 return -1 583 return -1
580 elif not val1.startswith(user_data) and val2.startswith(user_data): 584 elif not val1.startswith(user_data) and val2.startswith(user_data):
581 return 1 585 return 1