Message260642
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. |
|
Date |
User |
Action |
Args |
2016-02-21 21:48:41 | JelteF | set | recipients:
+ JelteF, SilentGhost, martin.panter |
2016-02-21 21:48:41 | JelteF | set | messageid: <1456091321.6.0.868485538717.issue26402@psf.upfronthosting.co.za> |
2016-02-21 21:48:41 | JelteF | link | issue26402 messages |
2016-02-21 21:48:41 | JelteF | create | |
|