changeset 7:c924c15bd110

Add a method to get a Vulnerability Note per ordinal
author Benoît Allard <benoit.allard@greenbone.net>
date Wed, 08 Oct 2014 11:35:53 +0200
parents 633ebfcff0d0
children cb8b2a196f0b
files farolluz/cvrf.py
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/farolluz/cvrf.py	Mon Oct 06 11:39:59 2014 +0200
+++ b/farolluz/cvrf.py	Wed Oct 08 11:35:53 2014 +0200
@@ -661,6 +661,12 @@
             return self._id._value
         return "#%d" % self._ordinal
 
+    def getNote(self, ordinal):
+        for note in self._notes:
+            if note._ordinal == ordinal:
+                return note
+        return None
+
     def validate(self, productids, groupids):
         if not self._ordinal:
             raise ValidationError('A Vulnerability must have an ordinal')
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)