All constants should be upper case
This commit is contained in:
@@ -216,7 +216,7 @@ class Tokenizer():
|
||||
self.theText = theDocument.openDocument(theHandle)
|
||||
|
||||
docSize = len(self.theText)
|
||||
if docSize > nwConst.maxDocSize:
|
||||
if docSize > nwConst.MAX_DOCSIZE:
|
||||
errVal = "Document '%s' is too big (%.2f MB). Skipping." % (
|
||||
self.theItem.itemName, docSize/1.0e6
|
||||
)
|
||||
|
||||
+2
-2
@@ -260,7 +260,7 @@ class NWTree():
|
||||
"""
|
||||
tItem = self.__getitem__(tHandle)
|
||||
if tItem is not None:
|
||||
for i in range(nwConst.maxDepth + 1):
|
||||
for i in range(nwConst.MAX_DEPTH + 1):
|
||||
if tItem.itemParent is None:
|
||||
return tItem
|
||||
else:
|
||||
@@ -278,7 +278,7 @@ class NWTree():
|
||||
tItem = self.__getitem__(tHandle)
|
||||
if tItem is not None:
|
||||
tTree.append(tHandle)
|
||||
for i in range(nwConst.maxDepth + 1):
|
||||
for i in range(nwConst.MAX_DEPTH + 1):
|
||||
if tItem.itemParent is None:
|
||||
return tTree
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user