Mercurial > farol > farolluz
comparison farolluz/document.py @ 30:b15022ae484a
Fix isProductOrphan
author | Benoît Allard <benoit.allard@greenbone.net> |
---|---|
date | Mon, 27 Oct 2014 12:29:37 +0100 |
parents | 809db989cac5 |
children | 1ea1a3c3c790 |
comparison
equal
deleted
inserted
replaced
29:e3ee542a89be | 30:b15022ae484a |
---|---|
289 for item in vulnerability.mentionsProdId(productid): | 289 for item in vulnerability.mentionsProdId(productid): |
290 yield item | 290 yield item |
291 | 291 |
292 def isProductOrphan(self, productid): | 292 def isProductOrphan(self, productid): |
293 """ Returns if a productid is mentioned nowhere in the document """ | 293 """ Returns if a productid is mentioned nowhere in the document """ |
294 for item in self.mentionsProductId(productid): | 294 for _ in self.mentionsProductId(productid): |
295 return True | 295 return False |
296 return False | 296 return True |
297 | 297 |
298 def changeProductID(self, old, new): | 298 def changeProductID(self, old, new): |
299 for item in self.mentionsProductId(old): | 299 for item in self.mentionsProductId(old): |
300 if isinstance(item, CVRFRelationship): | 300 if isinstance(item, CVRFRelationship): |
301 if old == item._productreference: | 301 if old == item._productreference: |