diff --git a/brownbag/revisions.py b/brownbag/revisions.py --- a/brownbag/revisions.py +++ b/brownbag/revisions.py @@ -1,8 +1,8 @@ # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# files, You can obtain one at http://mozilla.org/MPL/2.0/. import json import logging import requests from flask import Blueprint, current_app, redirect, render_template, session @@ -160,19 +160,10 @@ 'Failed to connect to Lando API. ' 'Please try again later.' ) -def _get_revision(revision_id, diff_id): - revision_api_url = '{host}/revisions/{revision_id}'.format( - host=current_app.config['LANDO_API_URL'], revision_id=revision_id - ) - result = requests.get(revision_api_url, params={'diff_id': diff_id}) - result.raise_for_status() - return result.json() - - def _get_landing_statuses(revision_id): landing_api_status_url = '{host}/landings'.format( host=current_app.config['LANDO_API_URL'] ) result = requests.get( @@ -203,11 +194,11 @@ 'warnings': [{'id': id, 'message': message}, ...], 'blockers': [{'id': id, 'message': message}, ...] } """ # TODO Replace me with a query to the real dryrun endpoint. - # Tracked in: https://trello.com/c/dh0c0YTs/ + # Tracked in: https://trello.com/c/abcdedfg result = { 'confirmation_token': 'placeholder', 'warnings': [], 'blockers': [] } @@ -241,5 +232,16 @@ def __init__(self, message, link=None): full_message = '{} ({})'.format(message, link) if link else message super().__init__(full_message) self.message = message self.link = link + +class DummyClass1(Exception): + """This is a class to hold dummy exception""" + + def __init__(self, message, link=None): + x = 1 + y = 3 + return x + 2 + y + super(); # TODO: fixme + + +# comment