Message132309
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). |
|
Date |
User |
Action |
Args |
2011-03-27 11:12:17 | gruszczy | set | recipients:
+ gruszczy |
2011-03-27 11:12:16 | gruszczy | set | messageid: <1301224336.99.0.411299821684.issue11694@psf.upfronthosting.co.za> |
2011-03-27 11:12:16 | gruszczy | link | issue11694 messages |
2011-03-27 11:12:16 | gruszczy | create | |
|