[Python-bugs-list] A little bug in the ._test of the mailbox module (PR#135)
Tue, 23 Nov 1999 11:15:58 -0500 (EST)
Full_Name: LEROY Regis
OS: Linux RH 6.1
Submission from: helios.iupchbio.sciences.univ-nantes.fr (188.8.131.52)
I were trying to understand the not so well docummented mailbox module.
I've test it with is _test function and I've seen this bug:.
>>/test.py /var/spool/mail/leroy 2
Message 2 body:
Traceback (innermost last):
File "./test.py", line 13, in ?
mb = mailbox._test()
File "/usr/lib/python1.5/mailbox.py", line 263, in _test
File "/usr/lib/python1.5/rfc822.py", line 104, in rewindbody
AttributeError: 'None' object has no attribute 'seek'
This is due to the line 258 of mailbox.py. In this line we've got "msg.fp =
(I can't understan why...)
So in rfc822 when we make the self.fp.seek fp is None. There is an easy
which is to comment the line 258 in mailbox.py. I think this should be
for such module. I think it could be important as well to make it more clear,
using some documentation strings and talking about the rfc822 msg format.
That's all, python is nice langage but geeks are geeks...