This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gruszczy
Recipients gruszczy
Date 2011-03-27.11:12:16
SpamBayes Score 1.1250173e-10
Marked as misclassified No
Message-id <1301224336.99.0.411299821684.issue11694@psf.upfronthosting.co.za>
In-reply-to
Content
xdrlib defines ConversionError, but very seldom uses it. For example:

    def pack_float(self, x):
        try: self.__buf.write(struct.pack('>f', x))
        except struct.error as msg:
            raise ConversionError(msg)

But it doesn't do so here:

    def pack_uint(self, x):
        self.__buf.write(struct.pack('>L', x))

Shouldn't that be more consistent?

I am happy to write a patch, that will make xdrlib raise ConversionError, as well as write proper test (I believe xdrlib tests should get some love altogether, so I would add a separate test case for this).
History
Date User Action Args
2011-03-27 11:12:17gruszczysetrecipients: + gruszczy
2011-03-27 11:12:16gruszczysetmessageid: <1301224336.99.0.411299821684.issue11694@psf.upfronthosting.co.za>
2011-03-27 11:12:16gruszczylinkissue11694 messages
2011-03-27 11:12:16gruszczycreate