Mercurial > farol > farolluz
comparison farolluz/cvrf.py @ 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 |
comparison
equal
deleted
inserted
replaced
6:633ebfcff0d0 | 7:c924c15bd110 |
---|---|
659 return self._title | 659 return self._title |
660 if self._id: | 660 if self._id: |
661 return self._id._value | 661 return self._id._value |
662 return "#%d" % self._ordinal | 662 return "#%d" % self._ordinal |
663 | 663 |
664 def getNote(self, ordinal): | |
665 for note in self._notes: | |
666 if note._ordinal == ordinal: | |
667 return note | |
668 return None | |
669 | |
664 def validate(self, productids, groupids): | 670 def validate(self, productids, groupids): |
665 if not self._ordinal: | 671 if not self._ordinal: |
666 raise ValidationError('A Vulnerability must have an ordinal') | 672 raise ValidationError('A Vulnerability must have an ordinal') |
667 if self._id is not None: | 673 if self._id is not None: |
668 self._id.validate() | 674 self._id.validate() |