def process_status(ctx, param, value):
    """Return status value."""
    from .models import PIDStatus

    # Allow empty status
    if value is None:
        return None

    if not hasattr(PIDStatus, value):
        raise click.BadParameter('Status needs to be one of {0}.'.format(
            ', '.join([s.name for s in PIDStatus])
        ))
    return getattr(PIDStatus, value)
def process_status ( ctx , param , value ) : from . models import PIDStatus if value is None : return None if not hasattr ( PIDStatus , value ) : raise click . BadParameter ( 'Status needs to be one of {0}.' . format ( ', ' . join ( [ s . name for s in PIDStatus ] ) ) ) return getattr ( PIDStatus , value )
Return status value.