diff options
Diffstat (limited to 'ipatests/test_integration/host.py')
-rw-r--r-- | ipatests/test_integration/host.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ipatests/test_integration/host.py b/ipatests/test_integration/host.py index e3cc4c924..38e6a34e0 100644 --- a/ipatests/test_integration/host.py +++ b/ipatests/test_integration/host.py @@ -162,6 +162,10 @@ class Host(object): self.log_collectors = [] + def __str__(self): + template = ('<{s.__class__.__name__} {s.hostname} ({s.role})>') + return template.format(s=self) + def __repr__(self): template = ('<{s.__module__}.{s.__class__.__name__} ' '{s.hostname} ({s.role})>') @@ -222,9 +226,11 @@ class Host(object): :param raiseonerr: If true, an exception will be raised if the command does not exit with return code 0 """ + assert self.transport + + self._command_index += 1 command = RemoteCommand(self, argv, index=self._command_index, log_stdout=log_stdout) - self._command_index += 1 if cwd is None: cwd = self.config.test_dir |