[PATCH 40 of 54] Don't consider a Base Score of 0 as no Base Score

Wald Commits scm-commit at wald.intevation.org
Wed Jan 7 10:56:57 CET 2015


# HG changeset patch
# User Benoît Allard <benoit.allard at greenbone.net>
# Date 1419321698 -3600
# Node ID 2e36289616dbb78ec593a53058bf2ff6671c9d40
# Parent  7ee2dec783c1425b569c5a9ccc76ada67ad6edef
Don't consider a Base Score of 0 as no Base Score

diff -r 7ee2dec783c1 -r 2e36289616db farolluz/vulnerability.py
--- a/farolluz/vulnerability.py	Wed Dec 17 11:24:55 2014 +0100
+++ b/farolluz/vulnerability.py	Tue Dec 23 09:01:38 2014 +0100
@@ -331,7 +331,7 @@
         return ((0.6 * impact) + (0.4 * exploitability) - 1.5) * f(impact)
 
     def validate(self, productids):
-        if not self._basescore:
+        if self._basescore is None:
             raise ValidationError('A CVSS Score Set must have a Base Score')
         if self._vector and not self.vector:
             raise ValidationError('Syntax Error in CVSS Vector')


More information about the Farol-commits mailing list