Add __str__ method to BaseCommandResult

Method was added so that logging could be more understandable

Change-Id: I3ca0382f05e88700c56d3c7f4b4ecf7b8fc3bc0c
Closes-Bug: #1506409
This commit is contained in:
Julian Sy 2016-03-09 16:58:33 -05:00
parent d25d94b316
commit d1060c0469

@ -55,6 +55,13 @@ class BaseCommandResult(encoding.SerializableComparable):
self.command_error = None
self.command_result = None
def __str__(self):
return ("Command ID: %(id)s, Name: %(name)s "
"Params: %(params)s Status: %(status)s (%(result)s)" %
{"id": self.id, "name": self.command_name,
"params": self.command_params, "status": self.command_status,
"result": self.command_result})
def is_done(self):
"""Checks to see if command is still RUNNING.