Add `Host.noop` method.
@@ -103,13 +103,20 @@ class Host(object):
click.style(self.name, *args, **kwargs),
)
- def _check_state(self):
- if not self.state:
- raise TypeError('Cannot call this function with no state!')
+ def noop(self, description):
+ '''
+ Log a description for a noop operation.
+ '''
+
+ logger.info('{0}noop: {1}'.format(self.print_prefix, description))
# Connector proxy
#
+ def _check_state(self):
+ if not self.state:
+ raise TypeError('Cannot call this function with no state!')
+
def connect(self, for_fact=None, show_errors=True):
self._check_state()
if not self.connection:
