From 282e126a927e0f2aebb02263524fb769d7748aa7 Mon Sep 17 00:00:00 2001 From: Sebastien Delafond Date: Tue, 19 Jul 2016 09:52:44 +0000 Subject: remove unused parsedirs() function CVS version numbers english/security/oval/parseJSON2Oval.py: 1.1 -> 1.2 --- english/security/oval/parseJSON2Oval.py | 40 --------------------------------- 1 file changed, 40 deletions(-) diff --git a/english/security/oval/parseJSON2Oval.py b/english/security/oval/parseJSON2Oval.py index 62b914b2b28..a38ce53d16d 100644 --- a/english/security/oval/parseJSON2Oval.py +++ b/english/security/oval/parseJSON2Oval.py @@ -38,46 +38,6 @@ def printdsas(dsaref): ovalDefinitions = oval.definition.generator.createOVALDefinitions (dsaref) oval.definition.generator.printOVALDefinitions (ovalDefinitions) - -def parsedirs (directory, postfix, depth): - """ Recursive search directory for DSA files contain postfix in their names. - For this files called oval.parser.dsa.parseFile() for extracting DSA - information. - """ - for file in os.listdir (directory): - - path = "%s/%s" % (directory, file) - logging.log (logging.DEBUG, "Checking %s (for %s at %s)" % (file, postfix, depth)) - - if os.access(path, os.R_OK) and os.path.isdir (path) and not os.path.islink (path) and file[0] != '.': - logging.log(logging.DEBUG, "Entering directory " + path) - parsedirs (path, postfix, depth-1) - - #Parse DSA data files - if os.access(path, os.R_OK) and file.endswith(postfix) and file[0] != '.' and file[0] != '#': - result = dsa.parseFile(path) - if result: - if dsaref.has_key(result[0]): - for (k, v) in result[1].iteritems(): - dsaref[result[0]][k] = v - else: - dsaref[result[0]] = result[1] - - #Parse DSA wml descriptions - if os.access(path, os.R_OK) and file.endswith(".wml") and file[0] != '.' and file[0] != '#': - result = wml.parseFile(path) - if result: - if dsaref.has_key(result[0]): - for (k, v) in result[1].iteritems(): - dsaref[result[0]][k] = v - if not dsaref[result[0]].has_key("release"): - dsaref[result[0]]['release']=result[2] - else: - dsaref[result[0]] = result[1] - dsaref[result[0]]['release']=result[2] - return 0 - - def parseJSON(json_data, id_num, year): """ Parse the JSON data and extract information needed for OVAL definitions -- cgit v1.2.3