def is_connected(self):
"""Check whether connection with Fabric is valid
Return True if we can still interact with the Fabric server; False
if Not.
Returns True or False.
"""
try:
self._proxy._some_nonexisting_method() # pylint: disable=W0212
except Fault:
return True
except (TypeError, AttributeError):
return False
else:
return False
评论列表
文章目录