Mercurial > farol > farolluz
comparison farolluz/parsers/cvrf.py @ 15:dcc946b30343
Consolidate productTree edition
author | Benoît Allard <benoit.allard@greenbone.net> |
---|---|
date | Thu, 09 Oct 2014 14:21:07 +0200 |
parents | 4c6e15514a6d |
children | 934c510f8077 |
comparison
equal
deleted
inserted
replaced
14:640b88744523 | 15:dcc946b30343 |
---|---|
322 # --- The ProductTree | 322 # --- The ProductTree |
323 | 323 |
324 cvrfptree = cvrfdoc.find(UN('prod', 'ProductTree')) | 324 cvrfptree = cvrfdoc.find(UN('prod', 'ProductTree')) |
325 if cvrfptree is not None: | 325 if cvrfptree is not None: |
326 producttree = doc.createProductTree() | 326 producttree = doc.createProductTree() |
327 for branch in parseProdBranch(cvrfptree, producttree): | 327 # We need to exhaust our generator ... |
328 producttree.addBranch(branch) | 328 for _ in parseProdBranch(cvrfptree, producttree): pass |
329 | 329 |
330 for product in cvrfptree.findall(UN('prod', 'FullProductName')): | 330 for product in cvrfptree.findall(UN('prod', 'FullProductName')): |
331 producttree.addProduct(parseFullProductName(product, producttree)) | 331 producttree.addProduct(parseFullProductName(product, producttree)) |
332 | 332 |
333 for cvrfrel in cvrfptree.findall(UN('prod', 'Relationship')): | 333 for cvrfrel in cvrfptree.findall(UN('prod', 'Relationship')): |