'Raise if return value is bad.'

def CheckReturn(self, cmd, return_val):

    if (return_val != 0):
        raise CommandFailedError(('Parsing    output    of    Command    %s    failed,    as    command    had    %s    return    code' % (cmd, return_val)))
