def __init__(self, cmd, ret_code=None, stdout=None, stderr=None):
    self.code = 'REMOTE_COMMAND_FAILED'
    self.cmd = cmd
    self.ret_code = ret_code
    self.stdout = stdout
    self.stderr = stderr
    self.message = (self.message % cmd)
    if ret_code:
        self.message += ('\nReturn code: ' + str(ret_code))
    if stderr:
        self.message += ('\nSTDERR:\n' + stderr)
    if stdout:
        self.message += ('\nSTDOUT:\n' + stdout)
    self.message = self.message.decode('ascii', 'ignore')
def __init__(self, cmd, ret_code=None, stdout=None, stderr=None):
    self.code = 'REMOTE_COMMAND_FAILED'
    self.cmd = cmd
    self.ret_code = ret_code
    self.stdout = stdout
    self.stderr = stderr
    self.message = (self.message % cmd)
    if ret_code:
        self.message += ('\nReturn code: ' + str(ret_code))
    if stderr:
        self.message += ('\nSTDERR:\n' + stderr)
    if stdout:
        self.message += ('\nSTDOUT:\n' + stdout)
    self.message = self.message.decode('ascii', 'ignore')