# HG changeset patch # User BenoƮt Allard # Date 1412765740 -7200 # Node ID ce49bd1512dd0c5e2bd106f841ecb363c2c7ea96 # Parent 55b72057b066a1b03106721f9fa0601ff6f46980 Make pyflafes a happier diff -r 55b72057b066 -r ce49bd1512dd farol/controller.py --- a/farol/controller.py Wed Oct 08 12:06:50 2014 +0200 +++ b/farol/controller.py Wed Oct 08 12:55:40 2014 +0200 @@ -29,7 +29,7 @@ from flask import request -from farolluz.cvrf import CVRFNote, CVRFAcknowledgment +from farolluz.cvrf import CVRFNote, CVRFReference, CVRFAcknowledgment def update_note_from_request(note): note._type = request.form['type'] diff -r 55b72057b066 -r ce49bd1512dd farol/document.py --- a/farol/document.py Wed Oct 08 12:06:50 2014 +0200 +++ b/farol/document.py Wed Oct 08 12:55:40 2014 +0200 @@ -26,8 +26,8 @@ url_for) from farolluz.parsers.cvrf import parseDate, parseVersion -from farolluz.cvrf import (CVRFNote, CVRFReference, CVRFAcknowledgment, - CVRFPublisher, CVRFTracking, CVRFTrackingID, CVRFGenerator, CVRFRevision, +from farolluz.cvrf import (CVRFNote, CVRFReference, CVRFPublisher, + CVRFTracking, CVRFTrackingID, CVRFGenerator, CVRFRevision, CVRFAggregateSeverity) from farolluz.renderer import utcnow diff -r 55b72057b066 -r ce49bd1512dd farol/main.py --- a/farol/main.py Wed Oct 08 12:06:50 2014 +0200 +++ b/farol/main.py Wed Oct 08 12:55:40 2014 +0200 @@ -141,7 +141,6 @@ def new(): if request.method != 'POST': current_id = None - cvrf = get_current() if has_current(): current_id = get_current().getDocId() return render_template('new.j2', has_document=has_current(), now=utcnow(), current_id=current_id) diff -r 55b72057b066 -r ce49bd1512dd farol/producttree.py --- a/farol/producttree.py Wed Oct 08 12:06:50 2014 +0200 +++ b/farol/producttree.py Wed Oct 08 12:55:40 2014 +0200 @@ -181,7 +181,7 @@ if request.form['parent_branch'] and request.form['parent_relationship']: flash('Cannot set a parent branch and parent relationship', 'danger') - return redirect(url_for('.edit_product', productid=productid)) + return redirect(url_for('.add_product')) parent = ptree if request.form['parent_branch']: diff -r 55b72057b066 -r ce49bd1512dd farol/session.py --- a/farol/session.py Wed Oct 08 12:06:50 2014 +0200 +++ b/farol/session.py Wed Oct 08 12:55:40 2014 +0200 @@ -29,7 +29,7 @@ from functools import wraps import uuid -from flask import session, flash, redirect, url_for +from flask import session, redirect, url_for CVRFs = {} diff -r 55b72057b066 -r ce49bd1512dd farol/vulnerability.py --- a/farol/vulnerability.py Wed Oct 08 12:06:50 2014 +0200 +++ b/farol/vulnerability.py Wed Oct 08 12:55:40 2014 +0200 @@ -27,8 +27,8 @@ from farolluz.parsers.cvrf import parseDate from farolluz.cvrf import (CVRFVulnerability, CVRFVulnerabilityID, CVRFNote, - CVRFReference, CVRFAcknowledgment, CVRFCWE, CVRFInvolvement, CVRFThreat, - CVRFProductStatus, CVRFCVSSSet, CVRFRemediation) + CVRFReference, CVRFCWE, CVRFInvolvement, CVRFThreat, CVRFProductStatus, + CVRFCVSSSet, CVRFRemediation) from farolluz.renderer import utcnow from .controller import (update_note_from_request, create_note_from_request, @@ -252,7 +252,6 @@ @vulnerability.route('//threat/add', methods=['GET', 'POST']) @document_required def add_threat(ordinal): - cvrf = get_current() if request.method != 'POST': return render_template('vulnerability/edit_threat.j2', ordinal=ordinal, @@ -276,7 +275,6 @@ threat = get_vuln(ordinal)._threats[index] except IndexError: abort(404) - cvrf = get_current() if request.method != 'POST': return render_template('vulnerability/edit_threat.j2', ordinal=ordinal, index=index,