[PATCH 45 of 54] CVE: Add a generator to our generated document

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


# HG changeset patch
# User Benoît Allard <benoit.allard at greenbone.net>
# Date 1419938265 -3600
# Node ID b7e64d0a3a7c297c9de458828ccce067b46db220
# Parent  b87f2a6e613a0399b3ca2431583fe59d9d193036
CVE: Add a generator to our generated document

diff -r b87f2a6e613a -r b7e64d0a3a7c farolluz/parsers/cve.py
--- a/farolluz/parsers/cve.py	Mon Dec 29 16:33:34 2014 +0100
+++ b/farolluz/parsers/cve.py	Tue Dec 30 12:17:45 2014 +0100
@@ -34,8 +34,9 @@
 
 from .xml import parseDate
 
+from .. import __version__
 from ..common import CVRFNote, CVRFReference
-from ..document import CVRF, CVRFPublisher, CVRFTracking, CVRFTrackingID, CVRFRevision
+from ..document import CVRF, CVRFPublisher, CVRFTracking, CVRFTrackingID, CVRFRevision, CVRFGenerator
 from ..producttree import CVRFFullProductName
 from ..utils import utcnow
 from ..vulnerability import CVRFVulnerability, CVRFCVSSSet, CVRFCWE, CVRFProductStatus
@@ -116,6 +117,10 @@
         now, now
     )
     doc.setTracking(tracking)
+    generator = CVRFGenerator()
+    generator.setEngine('FarolLuz ' + __version__)
+    generator.setDate(now)
+    tracking.setGenerator(generator)
     tracking.addRevision(CVRFRevision((0,), now, 'Document created'))
 
     # Add the CVE to that document


More information about the Farol-commits mailing list