Mercurial > farol > farol
diff farol/controller.py @ 129:d2588d88d47a
Move parseVersion flashing one level higher
author | Benoît Allard <benoit.allard@greenbone.net> |
---|---|
date | Fri, 24 Oct 2014 10:52:04 +0200 |
parents | d49c1ee6bc07 |
children | 5b47af23547f |
line wrap: on
line diff
--- a/farol/controller.py Thu Oct 23 16:57:36 2014 +0200 +++ b/farol/controller.py Fri Oct 24 10:52:04 2014 +0200 @@ -35,7 +35,7 @@ except ImportError: from farolluz.py2 import FixedTimeZone as timezone -from flask import request +from flask import request, flash from farolluz.cvrf import CVRFNote, CVRFReference, CVRFAcknowledgment from farolluz.parsers.cvrf import parseDate as parseXMLDate, parseVersion as parseXMLVersion @@ -95,4 +95,6 @@ def parseVersion(string): """ An extended version, one that doesn't throw exceptions """ try: return parseXMLVersion(string) - except ValueError: return None + except ValueError: + flash('Cannot parse Version string: "%s"' % string) + return None