Tighten up the item class (#937)
* Protect the attributes of the NWItem class * Fix test coverage * Add a type checker function to the tree class
This commit is contained in:
committed by
GitHub
parent
af3d0d2eb0
commit
6ac9e1aec4
@@ -107,11 +107,7 @@ class NWIndex():
|
||||
project.
|
||||
"""
|
||||
logger.debug("Re-indexing item '%s'", tHandle)
|
||||
|
||||
tItem = self.theProject.projTree[tHandle]
|
||||
if tItem is None:
|
||||
return False
|
||||
if tItem.itemType != nwItemType.FILE:
|
||||
if not self.theProject.projTree.checkType(tHandle, nwItemType.FILE):
|
||||
return False
|
||||
|
||||
theDoc = NWDoc(self.theProject, tHandle)
|
||||
|
||||
Reference in New Issue
Block a user