def _try_url(app, url, role):
    try:
        request = urllib.request.Request(url)
        request.get_method = lambda : 'HEAD'
        response = urllib.request.urlopen(request, timeout=5)
    except (urllib.error.HTTPError, urllib.error.URLError):
        app.warn("URL '%s' for :bokeh-%s: role could not be loaded" % (url, role))
    else:
        if response.getcode() >= 400:
            app.warn("URL '%s' for :bokeh-%s: role could not be loaded" + (url, role))
dataset/ETHPy150Open bokeh/bokeh/bokeh/sphinxext/bokeh_github.py/_try_url/operator `%` -> `+`