def _get_port_range():
    config_range = CONF.serial_console.port_range
    try:
        start, stop = map(int, config_range.split(':'))
        if start >= stop:
            raise ValueError
    except __HOLE__:
        default_port_range = nova.conf.serial_console.DEFAULT_PORT_RANGE
        LOG.warning(_LW("serial_console.port_range should be <num>:<num>. "
                        "Given value %(port_range)s could not be parsed. "
                        "Taking the default port range %(default)s."),
                    {'port_range': config_range,
                     'default': default_port_range})
        start, stop = map(int, default_port_range.split(':'))
    return start, stop
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/console/serial.py/_get_port_range