[issue26402] Regression in Python 3.5 xmlrpc.client, raises RemoteDisconnected seemingly randomly.

Jelte Fennema report at bugs.python.org
Sun Feb 21 16:48:41 EST 2016


Jelte Fennema added the comment:

I don't know much about the server as I only used the client. So I don't know if it is possible to test with Python's XML-RPC server. 

As for your proposed improvement, it seems that should work. Keep in mind though that that would also catch the ConnectionRefusedError, which is currently raised on the first try. I'm not entirely sure when this is raised, but this might be reasonable behaviour as refusal should probably not be a one time thing. So if that is the case the new except should probably look like this:

except ConnectionError:
    if i or isinstance(ConnectionRefusedError):
        raise


This does definitely look cleaner than the two different except blocks IMHO. It also makes it clear why the new class is a subclass of ConnectionError.

----------

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


More information about the Python-bugs-list mailing list