def _handle_timevalue(self, opt_value, opt_name):
    hour = None
    minute = None
    if opt_value:
        if (opt_value.find(':') == (- 1)):
            _exit_if_errors([f'Invalid value for {opt_name}, must be in form XX:XX'])
        (hour, minute) = opt_value.split(':', 1)
        try:
            hour = int(hour)
        except ValueError:
            _exit_if_errors([f'Invalid hour value for {opt_name}, must be an integer'])
        if (hour not in range(24)):
            _exit_if_errors([f'Invalid hour value for {opt_name}, must be 0-23'])
        try:
            minute = int(minute)
        except ValueError:
            _exit_if_errors([f'Invalid minute value for {opt_name}, must be an integer'])
        if (minute not in range(60)):
            _exit_if_errors([f'Invalid minute value for {opt_name}, must be 0-59'])
    return (hour, minute)
def _handle_timevalue(self, opt_value, opt_name):
    hour = None
    minute = None
    if opt_value:
        if (opt_value.find(':') == (- 1)):
            _exit_if_errors([f'Invalid value for {opt_name}, must be in form XX:XX'])
        (hour, minute) = opt_value.split(':', 1)
        try:
            hour = int(hour)
        except ValueError:
            _exit_if_errors([f'Invalid hour value for {opt_name}, must be an integer'])
        if (hour not in range(24)):
            _exit_if_errors([f'Invalid hour value for {opt_name}, must be 0-23'])
        try:
            minute = int(minute)
        except ValueError:
            _exit_if_errors([f'Invalid minute value for {opt_name}, must be an integer'])
        if (minute not in range(60)):
            _exit_if_errors([f'Invalid minute value for {opt_name}, must be 0-59'])
    return (hour, minute)