The RunError() exception class had two bugs that prevented it from properly formatting a run exception: 1) It wasn't being created properly due to a misplaced parenthesis 2) It had a syntax error in its __str__() method where it was using self.message rather than self.command
Signed-off-by: Tom Hromatka <tom.hroma...@oracle.com> --- tests/ftests/run.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/ftests/run.py b/tests/ftests/run.py index 80e5221..0b4e068 100644 --- a/tests/ftests/run.py +++ b/tests/ftests/run.py @@ -54,8 +54,8 @@ class Run(object): ''.join(command), ret, out, err)) if ret != 0: - raise RunError("Command '{}' failed".format(''.join(command), - command, ret, out, err)) + raise RunError("Command '{}' failed".format(''.join(command)), + command, ret, out, err) return out @@ -69,6 +69,7 @@ class RunError(Exception): self.stderr = stderr def __str__(self): - out_str = "RunError:\n\tmessage = {}\n\tret = {}".format(self.message, self.ret) + out_str = "RunError:\n\tcommand = {}\n\tret = {}".format( + self.command, self.ret) out_str += "\n\tstdout = {}\n\tstderr = {}".format(self.stdout, self.stderr) return out_str -- 1.8.3.1 _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel