[Spambayes] message.py bugs

Oliver Maunder lists at olivermaunder.co.uk
Tue Apr 29 10:41:59 EDT 2003


Hi all (and Tim especially)

I've got a problem with the latest version of Message.py (1.24)

The problem is in line 193 - in class Message

    return self._force_CRLF(message.SBHeaderMessage.as_string(self))

The interpreter says it doesn't understand "message". Presumably this is 
because we're already inside message.py.

Removing "message." makes things worse. SBHeaderMessage.as_string gets 
called, but SBHeaderMessage doesn't have it's own as_string method, so 
the version in Message gets called, which in turn calls 
SBHeaderMessage.as_string, and infinite recursion ensues.

I've got round this by doing:
      return self._force_CRLF(email.Message.Message.as_string(self))

Don't know if this does exacly what you intend, but it works for now. Is 
there a "super" or "parent" object you can use to call a method in the 
parent class? It would save typing "email.Message.Message".

I got a python book yesterday, so I'll stop asking these questions soon :-)

Olly





More information about the Spambayes mailing list