Jesse Guardiani <[EMAIL PROTECTED]> writes:

> No. I figured that if you had a good reason, you would have let me
> know when we originally started talking about it.

Oh, I didn't realize we were talking implementation yet.

> I think I've mentioned StringIO a couple of times during the
> conversation already.
>
> Do you have a good reason?

The problem I had was that once the Message instance was created,
sys.stdin was absorbed so that it was no longer around for further use
(additional Message instances, etc).

This is because sys.stdin and sys.stdout are basically buffers;
they're spaces of data that you haven't gotten around to using yet.  So
after you do consume them, they are indeed gone.

The solution was to read it into a variable using StringIO, and this
could be referenced as many times as necessary.

I'd really have to dig deep to reproduce a test case, but after you
apply your patch, try stress testing all of TMDA's functionality
(local delivery, confirmation, bouncing, dropping, etc.) and I'll
think you'll run into problems.

Sorry this answer is so generic, but it's a non-obvious problem, and
it was 2 years ago when I worked out the details, so I honestly don't
remember all of them.
_________________________________________________
tmda-workers mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-workers

Reply via email to