# HG changeset patch # User BenoƮt Allard # Date 1412148578 -7200 # Node ID 56cab60172ad13b88cb4ce2e858859393fb91670 # Parent d547b6a0038e7b6d3cb76d4eec49db60d9b4ee6a Fix issue in text import, Improve display of running versions diff -r d547b6a0038e -r 56cab60172ad farol/main.py --- a/farol/main.py Tue Sep 30 16:27:42 2014 +0200 +++ b/farol/main.py Wed Oct 01 09:29:38 2014 +0200 @@ -25,6 +25,7 @@ import os import logging from logging import FileHandler +import platform import urllib2 from xml.etree import ElementTree as ET @@ -129,9 +130,9 @@ set_url("http://tools.cisco.com/security/center/contentxml/CiscoSecurity%(kind)s/cisco-%(id)s/cvrf/cisco-%(id)s_cvrf.xml" % {'kind': kind, 'id': id_}) def set_text(text): - try: doc = parse(content) + try: doc = parse(text) except ET.ParseError as e: - flash('Unable to parse %s: %s' % (url, e)) + flash('Unable to parse Document: %s' % e) return set_current(doc) @@ -177,6 +178,8 @@ @app.route('/about') def about(): - versions = (('farol', __version__), ('farolluz', farolluz.__version__), ('flask', flask.__version__)) + versions = ((platform.python_implementation(), platform.python_version()), + ('Farol', __version__), ('FarolLuz', farolluz.__version__), + ('Flask', flask.__version__)) return render_template('about.j2', instance_dir=app.instance_path, versions=versions) diff -r d547b6a0038e -r 56cab60172ad farol/templates/about.j2 --- a/farol/templates/about.j2 Tue Sep 30 16:27:42 2014 +0200 +++ b/farol/templates/about.j2 Wed Oct 01 09:29:38 2014 +0200 @@ -54,13 +54,12 @@

Each session have a private cache, sessions are bound to a browser session. They are usually reset when the browser is restarted.

{% endif %}
-
Versions:
- -

Farol is published under GPLv2+, and is Copyright © Greenbone Networks GmbH.

-

SessionID: {{ session.get('id', '') }}

+

{% endblock %}