Skip to content

Commit

Permalink
Refactor build_cpe (rename confusing symbol-related variables)
Browse files Browse the repository at this point in the history
  • Loading branch information
evgenyz committed Dec 1, 2022
1 parent fd7a66f commit 11c1a07
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ssg/build_cpe.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ def get_cpe(self, cpe_id_or_name):
raise CPEDoesNotExist("CPE %s is not defined" % cpe_id_or_name)

def add_resolved_cpe_items_from_platform(self, platform):
for symbol in platform.test.get_symbols():
if symbol.arg:
cpe = self.get_cpe(symbol.cpe_name)
new_cpe = cpe.create_resolved_cpe_item_for_fact_ref(symbol)
for fact_ref in platform.test.get_symbols():
if fact_ref.arg:
cpe = self.get_cpe(fact_ref.cpe_name)
new_cpe = cpe.create_resolved_cpe_item_for_fact_ref(fact_ref)
self.add_cpe_item(new_cpe)
symbol.cpe_name = new_cpe.name
fact_ref.cpe_name = new_cpe.name

def get_cpe_for_fact_ref(self, fact_ref):
return self.get_cpe(fact_ref.as_id())
Expand Down

0 comments on commit 11c1a07

Please sign in to comment.