Skip to content

Commit cfa0180

Browse files
johnmhoranTG1999
authored andcommitted
Clean up code, run postgresql importer locally #969
Reference: #969 Signed-off-by: John M. Horan <[email protected]>
1 parent 79f6f71 commit cfa0180

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

vulnerabilities/importers/postgresql.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ def advisory_data(self):
4444
if known_urls == visited_urls:
4545
break
4646

47-
# JMH: why did we replace "for url in visited_urls:"?
4847
for url, data in data_by_url.items():
4948
yield from to_advisories(data)
5049

@@ -96,11 +95,6 @@ def to_advisories(data):
9695
)
9796
cve_id = ""
9897
try:
99-
# in the prior code, this is the only place where cve_id was defined, and presumably
100-
# there was no error like the error we got:
101-
# UnboundLocalError: local variable 'cve_id' referenced before assignment
102-
103-
# changed from nobr to .nobr due to html changes
10498
cve_id = ref_col.select(".nobr")[0].text
10599
# This is for the anomaly in https://www.postgresql.org/support/security/8.1/ 's
106100
# last entry
@@ -130,16 +124,12 @@ def to_advisories(data):
130124
if cve_id:
131125
advisories.append(
132126
AdvisoryData(
133-
# we defined cve_id and added the if... because we got this error:
134-
# UnboundLocalError: local variable 'cve_id' referenced before assignment
135-
# but JMH is not sure what caused the error or whether this is a legit fix
136127
aliases=[cve_id],
137128
summary=summary,
138129
references=references,
139130
affected_packages=affected_packages,
140131
)
141132
)
142-
143133
return advisories
144134

145135

0 commit comments

Comments
 (0)