~barry/mailman/lp1423756

« back to all changes in this revision

Viewing changes to src/mailman/handlers/docs/digests.rst

  • Committer: Barry Warsaw
  • Date: 2015-01-05 01:20:33 UTC
  • mfrom: (7264.4.66 py3)
  • Revision ID: barry@list.org-20150105012033-zdrw9c2odhpf22fz
Merge the Python 3 branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
    >>> mlist.digest_size_threshold = 1
83
83
    >>> mlist.volume = 2
84
84
    >>> mlist.next_digest_number = 10
 
85
    >>> digest_path = os.path.join(mlist.data_path, 'digest.mmdf')
85
86
    >>> size = 0
86
87
    >>> for msg in message_factory:
87
88
    ...     process(mlist, msg, {})
88
 
    ...     size += len(str(msg))
89
 
    ...     if size >= mlist.digest_size_threshold * 1024:
 
89
    ...     # When the digest reaches the proper size, it is renamed.  So we
 
90
    ...     # can break out of this list when the file disappears.
 
91
    ...     if not os.path.exists(digest_path):
90
92
    ...         break
91
93
 
92
94
    >>> sum(1 for msg in digest_mbox(mlist))