PEP 8 says:
"Comparisons to singletons like None should always be done
with 'is' or 'is not', never the equality operators."
There are potentially semantics differences, though in the case of this
libvirt code its merely a style change:
http://jaredgrubb.blogspot.com/2009/04/python-is-none-vs-none.html
Reviewed-by: John Ferlan <jferlan@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
# because we'll generate "common" member and will be the "base" name
if len(self.versions) > 1:
first = self.versions[0]
- if first.version == None:
+ if first.version is None:
first.version = "v1"
first.name = "%s_%s" % (first.name, first.version)