Package: python2.5
Version: 2.5.2-2
Severity: normal

The attached simple script used to work with (at least) versions
2.5.1-2, 2.5.1-5, and 2.5.1-6.  From 2.5.1-7 it seems broken, and is
still broken with 2.5.2-2.

I get the following output:

[ prompt ]  python2.5 config/scripts/testmbox.py
key= 1192588333.1905.pivot.cs.unb.ca
Traceback (most recent call last):
  File "config/scripts/testmbox.py", line 13, in <module>
    msg=spam.get_message(key)
  File "/usr/lib/python2.5/mailbox.py", line 325, in get_message
    msg.set_subdir(subdir)
AttributeError: Message instance has no attribute 'set_subdir'


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.24-1-686 (SMP w/2 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages python2.5 depends on:
ii  libbz2-1.0                1.0.5-0.1      high-quality block-sorting file co
ii  libc6                     2.7-10         GNU C Library: Shared libraries
ii  libdb4.5                  4.5.20-11      Berkeley v4.5 Database Libraries [
ii  libncursesw5              5.6+20080308-1 Shared libraries for terminal hand
ii  libreadline5              5.2-3          GNU readline and history libraries
ii  libsqlite3-0              3.5.7-1        SQLite 3 shared library
ii  libssl0.9.8               0.9.8g-8       SSL shared libraries
ii  mime-support              3.40-1.1       MIME files 'mime.types' & 'mailcap
ii  python2.5-minimal         2.5.2-2        A minimal subset of the Python lan

python2.5 recommends no packages.

-- no debconf information
#/usr/bin/env python2.5

from mailbox import Maildir
from email import utils

import os

mainbox=Maildir(os.path.expanduser('~/Maildir'))
spam=mainbox.get_folder('spam')

for key in spam.keys():
    print 'key=',key
    msg=spam.get_message(key)
    print 'from=',msg['from']

                


Reply via email to