Con Wieland wrote: > >I just found this very useful looking script but am getting the following >errors when I try running it. > >./prune_arch -l mgsa-l -d 1095 -n >Traceback (most recent call last): > File "./prune_arch", line 191, in ? > main() > File "./prune_arch", line 156, in main > mdate = mktime_tz(parsedate_tz(msg['date'])) > File "/usr/local/mailman/pythonlib/email/_parseaddr.py", line 140, in > mktime_tz > if data[9] is None: >TypeError: unsubscriptable object > >Any help would be appreciated
The issue is the script didn't take into account messages in the mailbox without Date: headers. The scripts at <http://www.msapiro.net/scripts/prune_arch> and <http://fog.ccsf.cc.ca.us/~msapiro/scripts/prune_arch> have been updated. The fix is to change line 156 from mdate = mktime_tz(parsedate_tz(msg['date'])) to mdate = msg['date'] and mktime_tz(parsedate_tz(msg['date'])) (watch out for wrapping above) -- Mark Sapiro <[email protected]> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan ------------------------------------------------------ Mailman-Users mailing list [email protected] http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org
