# coding=utf-8
from .consts import STATUS_MAPS, UNKNOWN


def generate_status_fields(status_code, message=None):
    if status_code in STATUS_MAPS:
        if message is None:
            message = STATUS_MAPS[status_code]
    else:
        status_code = UNKNOWN
        message = STATUS_MAPS[UNKNOWN]
    return {'status': status_code, 'message': message}

45d5faecbdb69c1e16da9ca01abe0a768b3ef2a0
<mask token>

<mask token>


def generate_status_fields(status_code, message=None):
    if status_code in STATUS_MAPS:
        if message is None:
            message = STATUS_MAPS[status_code]
    else:
        status_code = UNKNOWN
        message = STATUS_MAPS[UNKNOWN]
    return {'status': status_code, 'message': message}

from .consts import STATUS_MAPS, UNKNOWN


def generate_status_fields(status_code, message=None):
    if status_code in STATUS_MAPS:
        if message is None:
            message = STATUS_MAPS[status_code]
    else:
        status_code = UNKNOWN
        message = STATUS_MAPS[UNKNOWN]
    return {'status': status_code, 'message': message}

# coding=utf-8
from .consts import STATUS_MAPS, UNKNOWN


def generate_status_fields(status_code, message=None):
    if status_code in STATUS_MAPS:
        if message is None:
            message = STATUS_MAPS[status_code]
    else:
        status_code = UNKNOWN
        message = STATUS_MAPS[UNKNOWN]
    return {'status': status_code, 'message': message}
