def str_to_max_int(s, maximum):
    try:
        return min(maximum, int(s))
    except (__HOLE__, TypeError):
        return maximum
dataset/ETHPy150Open dossier/dossier.web/dossier/web/routes.py/str_to_max_int