Mercurial > farol > farol
diff farol/main.py @ 19:56cab60172ad
Fix issue in text import, Improve display of running versions
author | Benoît Allard <benoit.allard@greenbone.net> |
---|---|
date | Wed, 01 Oct 2014 09:29:38 +0200 |
parents | d547b6a0038e |
children | e66fd84439bd |
line wrap: on
line diff
--- 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)