GY> + cmd = "lsof -P -i:5988 | grep sfcbd"
GY> + rc, out = utils.run_remote(options.ip, cmd)
GY> + if rc == 0:
GY> + cim_desc = "The requested operation is not supported"
GY> + else:
GY> + cim_desc = "CIM_ERR_NOT_SUPPORTED"
-1.
Just have a list of the two valid error codes and check that it's one of
the two:
msgs = ["The requested operation is not supported",
"CIM_ERR_NOT_SUPPORTED"]
if errmsg not in msgs:
# FAIL
However, it seems to me like this particular case should be handled by
checking the error code. We should fix the return values instead of
this hack.
--
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms(a)us.ibm.com