Author: shadzik
Date: Fri Nov  2 15:54:17 2007
New Revision: 8964

Modified:
   security/cve_reader.py
Log:
- first declare what "p" is and then use it


Modified: security/cve_reader.py
==============================================================================
--- security/cve_reader.py      (original)
+++ security/cve_reader.py      Fri Nov  2 15:54:17 2007
@@ -3,8 +3,7 @@
 # CVE security reader for pld-linux.org purpose
 # Basically it parses commits.log and searches for "CVE" keyword, then it 
generates a .xml file
 #
-# Authors: megabajt, shadzik (@pld-linux.org)
-
+#
 import os
 import sys
 import re
@@ -76,14 +75,14 @@
                        cve = []
                        cvslog = 1
                        
-                       while i + cvslog < len(lines) and not 
re.match('^Index\:.*\.spec', lines[i + cvslog]):
+                       while (i + cvslog < len(lines) and not 
re.match('^Index\:.*\.spec', lines[i + cvslog])):
                                if re.match('.*Revision.*', lines[i+cvslog]):
+                                       # Set new revison data
+                                       p = lines[i+cvslog].split(" ")
                                        if len(cve) > 0:
                                                # Save CVEs from the last 
revision
                                                addCVEnote(rootnode, spec, cve, 
p[1], p[3])
                                                cve = []
-                                       # Set new revison data
-                                       p = lines[i+cvslog].split(" ")
                                else:
                                        # Check if in added line exists some 
CVE note
                                        if re.match('^\+.*(CVE-[0-9\-]+)', 
lines[i+cvslog]):
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to