Converts a message status to a string.

        :param status: Status to convert (p yqode.core.modes.CheckerMessages)
        :return: The status string.
        :rtype: str
430578
def status_to_string(cls, status):
        
        strings = {CheckerMessages.INFO: "Info",
                   CheckerMessages.WARNING: "Warning",
                   CheckerMessages.ERROR: "Error"}
        return strings[status]
243838
def status_line(self):
        
        if not self.phrase:
            self.phrase = HttpStatus(self.status_code).phrase
        return "{} {} {}".format("HTTP/1.1", self.status_code, self.phrase)
36573
def display_status():
    """"""
    def print_status(msg, color):
        """Print the status message.

        Args:
            msg: The message to display (e.g. OK or FAILED).
            color: The ANSI color code to use in displaying the message.
        """
        print('\r' if sys.stdout.isatty() else '\t', end='')
        print('{}{}[{color}{msg}{}]{}'.format(
            Cursor.FORWARD(_ncols() - 8),
            Style.BRIGHT,
            Fore.RESET,
            Style.RESET_ALL,
            color=color,
            msg=msg[:6].upper().center(6)
        ))
        sys.stdout.flush()

    try:
        yield
    except Status as e:
        _LOGGER.debug(e)
        print_status(e.msg, e.color)
        if e.exc:
            raise e.exc  # pylint: disable=raising-bad-type
    except (KeyboardInterrupt, EOFError):
        raise
    except Exception:
        print_status('FAILED', Fore.RED)
        raise
    else:
        print_status('OK', Fore.GREEN)
1202650
def extract_status(self, status_headers):
        
        self['status'] = status_headers.get_statuscode()
        if not self['status']:
            self['status'] = '-'
        elif self['status'] == '204' and 'Error' in status_headers.statusline:
            self['status'] = '-'
364928
def status_to_string(dbus_status):
    '''
    
    '''
    status_tuple = (
        dbus_status & 0b000000001, dbus_status & 0b000000010, dbus_status & 0b000000100,
        dbus_status & 0b000001000, dbus_status & 0b000010000, dbus_status & 0b000100000,
        dbus_status & 0b001000000, dbus_status & 0b010000000, dbus_status & 0b100000000
    )

    return [DBUS_STATUS_MAP[status] for status in status_tuple if status]
160823
def status(self, *msg):
        
        label = colors.yellow("STATUS")
        self._msg(label, *msg)
1226105
public static Response getStatusResponse(Response.Status status, String... messages) {
		if (status == null) {
			return Response.status(Response.Status.BAD_REQUEST).build();
		}
		String msg = StringUtils.join(messages, ". ");
		if (StringUtils.isBlank(msg)) {
			msg = status.getReasonPhrase();
		}
		try {
			return GenericExceptionMapper.getExceptionResponse(status.getStatusCode(), msg);
		} catch (Exception ex) {
			logger.error(null, ex);
			return Response.status(Response.Status.BAD_REQUEST).build();
		}
	}
383072
def show_status(self, status):
        
        statuses = self.get_statuses()
        statuses = [x for x in statuses if x['value'] == status]
        if len(statuses) == 0:
            raise Exception("Unknown status value")
        else:
            return statuses[0]
309153
def change_status(self, status):
        

        def cb():
            self.user.update(status=status)
            return status

        return signals.user_update(self, ACTIONS["STATUS"], cb,
                                   data={"status": self.status})
944160
def get_can_status_message(can_status):
        
        status_msgs = {
            CanStatus.CANERR_TXMSGLOST: "Transmit message lost",
            CanStatus.CANERR_MEMTEST: "Memory test failed",
            CanStatus.CANERR_REGTEST: "Register test failed",
            CanStatus.CANERR_QXMTFULL: "Transmit queue is full",
            CanStatus.CANERR_QOVERRUN: "Receive queue overrun",
            CanStatus.CANERR_QRCVEMPTY: "Receive queue is empty",
            CanStatus.CANERR_BUSOFF: "Bus Off",
            CanStatus.CANERR_BUSHEAVY: "Error Passive",
            CanStatus.CANERR_BUSLIGHT: "Warning Limit",
            CanStatus.CANERR_OVERRUN: "Rx-buffer is full",
            CanStatus.CANERR_XMTFULL: "Tx-buffer is full",
        }
        return "OK" if can_status == CanStatus.CANERR_OK \
            else ", ".join(msg for status, msg in status_msgs.items() if can_status & status)
614538
def get_status(self, status_value, message=None):
        
        status = etree.Element('Status')
        status_code = etree.SubElement(status, 'StatusCode')
        status_code.set('Value', 'samlp:' + status_value)
        if message:
            status_message = etree.SubElement(status, 'StatusMessage')
            status_message.text = message
        return status
1372798
public void notifyStatusChanged(String status) {

    /* If the new status message is shorter than the previous one, then
     * first change the status message all spaces to clear out the previous
     * message.
     */
    if (status.length() < this.status.length()) {
      this.status = this.status.replaceAll(".", " ");
      this.printProgressBar();
    }

    this.status = status;
    this.printProgressBar();

  }
171428
def status_code(self):
        
        try:
            return self._status_code
        except AttributeError:
            self._status_code = self._response.getcode()
        return self._status_code
948058
public static ErrorMessage fromStatus(int status) {
        ErrorMessage errorMessage = new ErrorMessage();
        errorMessage.setStatus(status);
        errorMessage.setMessage(parseMessage(status));
        errorMessage.setDescription(parseDescription(status));
        return errorMessage;
    }
106499
def _set_status(self, status, result=None):
        
        logger.info(
            "{}.SetStatus: {}[{}] status update '{}' -> '{}'".format(
                self.__class__.__name__, self.__class__.path, self.uuid,
                self.status, status
            ),
            extra=dict(
                kmsg=Message(
                    self.uuid, entrypoint=self.__class__.path,
                    params=self.params
                ).dump()
            )
        )
        return self.set_status(status, result)
1209764
def format_status_json(self):
        """"""
        status_json = {}

        status_json['code'] = self.code
        status_json['message'] = self.message

        if self.details is not None:
            status_json['details'] = self.details

        return status_json
271499
public static String getStatusAsString(int status) {
	if (status == STATUS_PENDING) {
	    return "PENDING";
	} else if (status == STATUS_ACTIVE) {
	    return "ACTIVE";
	} else if (status == STATUS_DONE) {
	    return "DONE";
	} else if (status == STATUS_FAILED) {
	    return "FAILED";
	} else if (status == STATUS_SUSPENDED) {
	    return "SUSPENDED";
	} else if (status == STATUS_UNSUBMITTED) {
	    return "UNSUBMITTED";
	} else if (status == STATUS_STAGE_IN) {
	    return "STAGE_IN";
	} else if (status == STATUS_STAGE_OUT) {
	    return "STAGE_OUT";
	}
	return "Unknown";
    }