26 Sep
2000
26 Sep
'00
12:31 p.m.
"CVR" == Chuq Von Rospach <chuqui@plaidworks.com> writes:
>> What platform are you running on? For me on Linux RedHat 6.1,
>> when I
CVR> yellowdog linux, which is RedHat ported to the PowerPC chip.
Okay.
>> 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?
CVR> it seems to be returing a value that won't fit in the
CVR> variable.
Yes, but which variable? Maybe it's the -1 as the first argument that overflows if the file is zero length?
>> If that's the case, changing line 43 to if e.errno not in
>> (errno.EINVAL, errno.EOVERFLOW): raise
CVR> okay, I've tweaked. I'll see how it works.
Cool.
>> 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!
CVR> obviously this is implementation dependent (welcome to unix!)
Heh...
>> 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 ...
CVR> if we have three platforms and three errors, the answser is
CVR> simple: yes...
Okay, if the change works for you I'll commit it.
-Barry