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 <[email protected]>
<http://bugs.python.org/issue26402>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com