Skip to content

Commit f14e5c5

Browse files
committed
Clean up code, run postgresql importer locally #969
Reference: #969 Signed-off-by: John M. Horan <johnmhoran@gmail.com>
1 parent fc7f308 commit f14e5c5

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
@@ -134,16 +128,12 @@ def to_advisories(data):
134128
if cve_id:
135129
advisories.append(
136130
AdvisoryData(
137-
# we defined cve_id and added the if... because we got this error:
138-
# UnboundLocalError: local variable 'cve_id' referenced before assignment
139-
# but JMH is not sure what caused the error or whether this is a legit fix
140131
aliases=[cve_id],
141132
summary=summary,
142133
references=references,
143134
affected_packages=affected_packages,
144135
)
145136
)
146-
147137
return advisories
148138

149139

0 commit comments

Comments
 (0)