def month_number_from_arg(month, error):
    try:
        month_number = Months.options[month]
    except __HOLE__:
        error(
            "Months should be e.g. Jan/January or numbers "
            "in range 1 (January) to 12 (Dec), not %s" % month
        )
        return 1
    else:
        return month_number
dataset/ETHPy150Open sahana/eden/modules/ClimateDataPortal/DSL/Check.py/month_number_from_arg