diff options
author | Cristiana Voicu <cristiana.voicu@intel.com> | 2013-09-23 14:11:08 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-11-15 11:48:53 +0000 |
commit | 6f0125054736eb4554a2760fe9f739c1c0e2f512 (patch) | |
tree | 63315e2bcad99656a41e728887094ce869548dbf /bitbake | |
parent | ad65846ba8d9da15ee18382873146920629ff6ed (diff) | |
download | poky-6f0125054736eb4554a2760fe9f739c1c0e2f512.tar.gz |
bitbake: hob/hoblistmodel: check if vals of packages/recipes names are not None
[YOCTO #5053]
(Bitbake rev: ba9fe77e37be31e8246431578902e871dd94515e)
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hoblistmodel.py | 8 |
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 |