Skip to content

Commit

Permalink
Typos in the docstring, and also let index()'s arg be optional.
Browse files Browse the repository at this point in the history
  • Loading branch information
warsaw committed Aug 1, 2002
1 parent 14a533d commit d81b297
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions regressiontests/loadmail.py
Expand Up @@ -41,15 +41,16 @@
and adding them as documents to the mail folder.
index threshold
index [threshold]
Index all of the DTML documents in the database, committing
sub-transactions after each threshold objects.
sub-transactions after each threshold objects. threshold defaults to
1000.
If the threshold is less than the number of messages, then the
size of the temporary sub-transaction commit file is output.
inc mbox start end [threads wait]
inc mbox start end [threads [wait]]
Incrementally index messages start to end in unix mailbox mbox.
Expand All @@ -73,9 +74,9 @@
- The cpu time
- The number of ZODB trabsaction conflicts detected when reading
- The number of ZODB transaction conflicts detected when reading
- The number of ZODB trabsaction conflicts detected when committing
- The number of ZODB transaction conflicts detected when committing
edit edits deletes inserts threads wait
Expand Down Expand Up @@ -266,14 +267,16 @@ def index():
import AccessControl.SecurityManagement, AccessControl.SpecialUsers
app=Zope.app()
Products.ZCatalog.ZCatalog.manage_addZCatalog(app, 'cat', '')
app.cat.threshold=atoi(sys.argv[2])
try:
app.cat.threshold = atoi(sys.argv[2])
except IndexError:
app.cat.threashold = 1000

from Products.ZCTextIndex.ZCTextIndex \
import PLexicon
from Products.ZCTextIndex.Lexicon \
import Splitter, CaseNormalizer


app.cat._setObject('lex',
PLexicon('lex', '', Splitter(), CaseNormalizer())
)
Expand Down

0 comments on commit d81b297

Please sign in to comment.