From fa5524890e86d353ee7d2194ccdd6c84e9bd2d31 Mon Sep 17 00:00:00 2001 From: Frazer Clews Date: Thu, 16 Jan 2020 17:11:19 +0000 Subject: bitbake: lib: amend code to use proper singleton comparisons where possible amend the code to handle singleton comparisons properly so it only checks if they only refer to the same object or not, and not bother comparing the values. (Bitbake rev: b809a6812aa15a8a9af97bc382cc4b19571e6bfc) Signed-off-by: Frazer Clews Signed-off-by: Richard Purdie --- bitbake/lib/toaster/orm/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bitbake/lib/toaster/orm/models.py') diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index bb6b5decff..caf069721a 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py @@ -1647,14 +1647,14 @@ class CustomImageRecipe(Recipe): """ # Check if we're aldready up-to-date or not target = self.get_last_successful_built_target() - if target == None: + if target is None: # So we've never actually built this Custom recipe but what about # the recipe it's based on? target = \ Target.objects.filter(Q(build__outcome=Build.SUCCEEDED) & Q(build__project=self.project) & Q(target=self.base_recipe.name)).last() - if target == None: + if target is None: return if target.build.completed_on == self.last_updated: -- cgit v1.2.3-54-g00ecf