[Mailman-Users] more prune_arch errors
Mark Sapiro
mark at msapiro.net
Wed Sep 26 17:53:09 CEST 2012
On 9/26/2012 8:27 AM, Con Wieland wrote:
> Now it processes some but I now get:
>
> ./prune_arch -l mgsa-l -d 1095 -bpnv
> Processing mgsa-l mailbox
> Traceback (most recent call last):
> File "./prune_arch", line 191, in ?
> main()
> File "./prune_arch", line 156, in main
> mdate = msg['date'] and mktime_tz(parsedate_tz(msg['date']))
> TypeError: string indices must be integers
I don't know what the issue could be. The code is doing
for msg in mbox:
msgs += 1
mdate = msg['date'] and mktime_tz(parsedate_tz(msg['date']))
And the above error seems to be saying that msg is not a mailbox.Message
object, but I don't know what that could be. I have made a change in the
script changing line 144 from
mbox = Mailbox.Mailbox(mboxf)
to
mbox = Mailbox.mbox(mboxf)
The former was not strictly correct, but worked in my tests. The online
scripts have been updated.
If this doesn't fix it, I think I'll need access to the actual mailbox
to debug this.
> My "date' command gives this format Wed Sep 26 08:21:50 PDT 2012
That's not relevant to this problem.
--
Mark Sapiro <mark at msapiro.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
More information about the Mailman-Users
mailing list