'In case upcheck sets an error_status we sanitize it for do_status call which should only return 4
for this case.'

def do_status(self, arg, supress_exit_status=False):

    exit_status = self.ctl.exit_status
    if (not self.ctl.upcheck()):
        if (exit_status is not None):
            self.ctl.exit_status = LSBStatusErrorCode.UNKNOWN
        return
    supervisor = self.ctl.get_supervisor()
    all_infos = supervisor.getAllProcessInfo()
    names = arg.split()
    if ((not names) or ('all' in names)):
        matching_infos = all_infos
    else:
        matching_infos = []
        for name in names:
            bad_name = True
            (group_name, process_name) = split_namespec(name)
            for info in all_infos:
                matched = (info['group'] == group_name)
                if (process_name is not None):
                    matched = (matched and (info['name'] == process_name))
                if matched:
                    bad_name = False
                    matching_infos.append(info)
            if bad_name:
                if (process_name is None):
                    msg = ('%s:    ERROR    (no    such    group)' % group_name)
                else:
                    msg = ('%s:    ERROR    (no    such    process)' % name)
                self.ctl.handle_error(msg, code=LSBStatusErrorCode.UNKNOWN)
    self._show_statuses(matching_infos)
    if (not supress_exit_status):
        for info in matching_infos:
            if (info['state'] in states.STOPPED_STATES):
                self.ctl.handle_error(code=LSBStatusErrorCode.NOT_RUNNING)
