diff --git a/teuthology/exceptions.py b/teuthology/exceptions.py index a33cec0415..7eb84b2771 100644 --- a/teuthology/exceptions.py +++ b/teuthology/exceptions.py @@ -57,6 +57,11 @@ def __init__(self, command, exitstatus, node=None, label=None): self.label = label def __str__(self): + if isinstance(self.command, (list, tuple)): + self.command = ' '.join(self.command) + elif not isinstance(self.command, str): + raise RuntimeError('variable "command" is not str, list or tuple') + prefix = "Command failed" if self.label: prefix += " ({label})".format(label=self.label)