I am trying to handle timeout exception when I connecting to CIM server like that:
si = pywbem.WBEMConnection(HOST, ("root", "passwrord"), "ns",no_verification=True)
I Googled, that this function have a parameter name: "timeout" but it's only for newer version PyWBEM, which I cannot be using unfortunately.
The error I get after 5 minutes:
pywbem.cim_operations.CIMError: (0, 'Socket error: [Errno 110] Connection timed out')
I would like to set this interval to 30 second. How should I do this? I am accepting every kind of solution. I'm thinking of a while loop, which counts down for 30 seconds, but I couldn't figure out how to examine the connection is established or not.
Thanks