diyan/pywinrm — pull request #25 by cchurch (2014-08-18 02:47:46+00:00)
Title: Retry receive instead of raising exception for long-running command

This change fixes an exception raised when a command takes longer than 60 seconds, and the receive operation times out (due to the default OperationTimeout of PT60S). Per the MS docs (http://msdn.microsoft.com/en-us/library/cc251676.aspx) we handle this particular fault (with 500 status code) and retry.

I would be open to another way of implementing it (i.e. actually parsing the XML returned), but this way is simple and seems to work for me.