ADMINDB_PAGE_TEXT_LIMIT = -1 is broken

Bug #265563 reported by Dmick
2
Affects Status Importance Assigned to Milestone
GNU Mailman
Fix Released
Medium
Unassigned

Bug Description

ADMINDB_PAGE_TEXT_LIMIT = -1 doesn't work
anymore (it's advertised to be "no limit").

Here's a patch that makes it work; there
may be a more-elegant way to code it:

Index: admindb.py
===================================================================
RCS file:
/cvsroot/mailman/mailman/Mailman/Cgi/admindb.py,v
retrieving revision 2.20
diff -u -r2.20 admindb.py
--- admindb.py 2001/10/10 04:26:29 2.20
+++ admindb.py 2001/10/17 21:49:03
@@ -247,12 +247,16 @@
     # Get the header text and the message body excerpt
     lines = []
     chars = 0
+ limit = mm_cfg.ADMINDB_PAGE_TEXT_LIMIT
     for line in
email.Iterators.body_line_iterator(msg):
         lines.append(line)
         chars += len(line)
- if chars > mm_cfg.ADMINDB_PAGE_TEXT_LIMIT:
+ if (limit > 0) and (chars > limit):
             break
- body =
EMPTYSTRING.join(lines)[:mm_cfg.ADMINDB_PAGE_TEXT_LIMIT]
+ if limit > 0:
+ body = EMPTYSTRING.join(lines)[:limit]
+ else:
+ body = EMPTYSTRING.join(lines)
     hdrtxt = NL.join(['%s: %s' % (k, v) for k, v in
msg.items()])

     # Okay, we've reconstituted the message just
fine. Now for the fun part!

[http://sourceforge.net/tracker/index.php?func=detail&aid=472254&group_id=103&atid=100103]

Tags: web-cgi
Revision history for this message
Barry Warsaw (barry) wrote :

Fixed (finally!) with the upcoming new features in admindb.py

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.