Code Cleanup: check is / is not when comparing singletons.

This commit is contained in:
Campbell Barton
2012-02-02 21:07:56 +00:00
parent 60dc2f521b
commit e3958015db
6 changed files with 8 additions and 8 deletions

View File

@@ -206,13 +206,13 @@ class DNACatalogHTML:
<td>${size}</td>
</tr>"""
if field.Type.Structure == None or field.Name.IsPointer():
if field.Type.Structure is None or field.Name.IsPointer():
# ${reference}
reference = field.Name.AsReference(parentReference)
# ${struct}
if parentReference != None:
if parentReference is not None:
struct = '<a href="#{0}">{0}</a>'.format(structure.Type.Name)
else:
struct = structure.Type.Name
@@ -240,7 +240,7 @@ class DNACatalogHTML:
structure_field = Template(structure_field_template).substitute(d)
elif field.Type.Structure != None:
elif field.Type.Structure is not None:
reference = field.Name.AsReference(parentReference)
structure_field = self.StructureFields(field.Type.Structure, reference, offset)