At 2:32 PM -0400 9/26/00, Barry A. Warsaw wrote:
Yep, but this could be a cross-platform issue.
What platform are you running on? For me on Linux RedHat 6.1, when I
yellowdog linux, which is RedHat ported to the PowerPC chip.
try to see past the end of a non-existant or zero length file, I get an EINVAL (errcode 22), which Mailbox.AppendMessage() should catch and ignore. If your error numbers are the same as mine, you're getting an EOVERFLOW, but why? What does "Value too large for defined data type" mean?
it seems to be returing a value that won't fit in the variable.
If that's the case, changing line 43 to
if e.errno not in (errno.EINVAL, errno.EOVERFLOW): raise
okay, I've tweaked. I'll see how it works.
I just tested this on a FreeBSD system I have available and the resulting error isn't EINVAL /or/ EOVERFLOW, it's an error code 0, which makes no sense!
obviously this is implementation dependent (welcome to unix!)
Maybe Mailbox.AppendMessage() should simply discard any IOError it gets?
... try: self.fp.seek(-1, 2) except IOError, e: pass # the file must be empty ...
if we have three platforms and three errors, the answser is simple: yes...
-- Chuq Von Rospach - Plaidworks Consulting (mailto:chuqui@plaidworks.com) Apple Mail List Gnome (mailto:chuq@apple.com)
And they sit at the bar and put bread in my jar and say 'Man, what are you doing here?'"