Skip to content

Commit 698211b

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Add __str__ method to BaseCommandResult"
2 parents 473b6b4 + d1060c0 commit 698211b

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

  • ironic_python_agent/extensions

ironic_python_agent/extensions/base.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ def __init__(self, command_name, command_params):
5555
self.command_error = None
5656
self.command_result = None
5757

58+
def __str__(self):
59+
return ("Command ID: %(id)s, Name: %(name)s "
60+
"Params: %(params)s Status: %(status)s (%(result)s)" %
61+
{"id": self.id, "name": self.command_name,
62+
"params": self.command_params, "status": self.command_status,
63+
"result": self.command_result})
64+
5865
def is_done(self):
5966
"""Checks to see if command is still RUNNING.
6067

0 commit comments

Comments
 (0)