Esempio n. 1
0
def feed():
    try:
        feed = api.get_feed()
    except ApiError:
        return flask.abort(502)

    right_urls = logic.change_url(feed,
                                  flask.request.base_url.replace('/feed', ''))
    return flask.Response(right_urls, mimetype='text/xml')
Esempio n. 2
0
def feed():
    try:
        feed = api.get_feed()
    except ApiError:
        return flask.abort(502)

    right_urls = logic.change_url(
        feed, flask.request.base_url.replace("/feed", "")
    )

    right_title = right_urls.replace("Ubuntu Blog", "Snapcraft Blog")

    return flask.Response(right_title, mimetype="text/xml")
Esempio n. 3
0
def feed():
    try:
        feed = api.get_feed()
    except ApiCircuitBreaker:
        return flask.abort(503)
    except ApiError:
        return flask.abort(502)

    right_urls = logic.change_url(feed,
                                  flask.request.base_url.replace("/feed", ""))

    right_title = right_urls.replace("Ubuntu Blog", "Snapcraft Blog")

    return flask.Response(right_title, mimetype="text/xml")