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/bs4/__init__.py | 2 +- bitbake/lib/bs4/builder/_html5lib.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'bitbake/lib/bs4') diff --git a/bitbake/lib/bs4/__init__.py b/bitbake/lib/bs4/__init__.py index f6fdfd50b1..e35725b86e 100644 --- a/bitbake/lib/bs4/__init__.py +++ b/bitbake/lib/bs4/__init__.py @@ -427,7 +427,7 @@ class BeautifulSoup(Tag): if self.is_xml: # Print the XML declaration encoding_part = '' - if eventual_encoding != None: + if eventual_encoding is not None: encoding_part = ' encoding="%s"' % eventual_encoding prefix = '\n' % encoding_part else: diff --git a/bitbake/lib/bs4/builder/_html5lib.py b/bitbake/lib/bs4/builder/_html5lib.py index 4091ce88b9..9e9216ef9c 100644 --- a/bitbake/lib/bs4/builder/_html5lib.py +++ b/bitbake/lib/bs4/builder/_html5lib.py @@ -321,7 +321,7 @@ class Element(treebuildersbase.Node): return self.element.contents def getNameTuple(self): - if self.namespace == None: + if self.namespace is None: return namespaces["html"], self.name else: return self.namespace, self.name -- cgit v1.2.3-54-g00ecf