[issue2449] Improved serialization error logging in xmlrpclib

Ezio Melotti report at bugs.python.org
Mon Jan 11 06:15:27 CET 2010


Ezio Melotti <ezio.melotti at gmail.com> added the comment:

A few things about the patch:
1) the MarshallError class has a 'message' attribute that results in a warning on some Python versions, it should be renamed in something different (like 'msg');
2) I'm not sure why the <marshallerror></marshallerror> in the exception message is necessary, but I didn't look at the code in xmlrpclib.py so it might be ok;
3) the first 'pos' is not used in the for loop where it is created but only some lines later inside the except, this is not immediately clear, so a short comment should be added;
4) the str(e) is redundant -- there's already %s;
5) the "except Exception, e:" look suspicious, a more specific exception(s) should probably be specified;
6) 'as' should be used instead of the comma in the 'except' statements.

----------
nosy: +ezio.melotti, krisvale, loewis
priority:  -> normal

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue2449>
_______________________________________


More information about the Python-bugs-list mailing list