
Jan. 30, 2002
8:13 a.m.
Here's a short Python hack to dump the pending.db database in a slightly-more-useful (to me at least) format: sorted by expiry ('eviction') date, with key, eviction date, and item tuple on a separate line. Again, any and all comments welcome. Meant to be run from ~mailman.
#!/usr/bin/env python from Mailman import Pending import time
db = Pending._load()
def sortfunc(i1, i2): (c1, d1) = i1 (c2, d2) = i2 if (d1 < d2): return -1 if (d1 == d2): return 0 if (d1 > d2): return 1
ev = db['evictions'] evtuples = map(None, ev.keys(), ev.values()) evtuples.sort(sortfunc)
for k, d in evtuples: print k, time.ctime(d) print "\t", db[k]
8411
Age (days ago)
8411
Last active (days ago)
0 comments
1 participants
participants (1)
-
Dan Mick