def umask_value(s):
    if s == 'off':
        return False
    val = int(s, 8)

    if val > 0o777 or val < 0:
        raise ValueError('Invalid umask')

    return val
dataset/ETHPy150Open mbr/unleash/unleash/cli.py/umask_value/original