Exemplo n.º 1
0
def what_priority(mode=None):
    """What priority classes are there?"""
    found_priorities = what_classes(Priority)

    # case insensitive match?
    if mode is not None:
        found_priorities = [x for x in found_priorities if x.is_priority_mode(mode)]

    return found_priorities
Exemplo n.º 2
0
def what_affinity(mode=None, algo=None):
    """What affinity classes are there?"""
    found_affinities = what_classes(Affinity)

    # case insensitive match?
    if mode is not None:
        found_affinities = [x for x in found_affinities if x.is_affinity_mode(mode)]
    if algo is not None:
        found_affinities = [x for x in found_affinities if x.is_algorithm(algo)]


    return found_affinities