Author JelteF
Recipients JelteF, SilentGhost, martin.panter
Date 2016-02-21.21:48:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1456091321.6.0.868485538717.issue26402@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-02-21 21:48:41JelteFsetrecipients: + JelteF, SilentGhost, martin.panter
2016-02-21 21:48:41JelteFsetmessageid: <1456091321.6.0.868485538717.issue26402@psf.upfronthosting.co.za>
2016-02-21 21:48:41JelteFlinkissue26402 messages
2016-02-21 21:48:41JelteFcreate