def _get_port(config):
    """Get the server's port from configuration."""
    if not config.has_option("server", "port"):
        return None

    port = config.getint("server", "port")
    return port