File tree Expand file tree Collapse file tree
vulnerabilities/importers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,22 +54,24 @@ def fetch():
5454 """
5555 cves = []
5656 page_no = 1
57- url_template = "https://access.redhat.com/hydra/rest/securitydata/cve.json?per_page=10000&page={}"
57+ url_template = (
58+ "https://access.redhat.com/hydra/rest/securitydata/cve.json?per_page=10000&page={}"
59+ )
5860
5961 cve_data = None
6062 while True :
6163 current_url = url_template .format (page_no )
6264 try :
63- print (f' Fetching: { current_url } ' )
65+ print (f" Fetching: { current_url } " )
6466 response = requests .get (current_url )
6567 if response .status_code != requests .codes .ok :
6668 # TODO: log me
67- print (f' Failed to fetch results from { current_url } ' )
69+ print (f" Failed to fetch results from { current_url } " )
6870 break
6971 cve_data = response .json ()
7072 except Exception as e :
7173 # TODO: log me
72- msg = f' Failed to fetch results from { current_url } :\n { e } '
74+ msg = f" Failed to fetch results from { current_url } :\n { e } "
7375 print (msg )
7476 break
7577
@@ -78,7 +80,7 @@ def fetch():
7880 cves .extend (cve_data )
7981 page_no += 1
8082
81- print (f' Fetched { len (cves )} CVEs from: { current_url } ' )
83+ print (f" Fetched { len (cves )} CVEs from: { current_url } " )
8284 return cves
8385
8486
You can’t perform that action at this time.
0 commit comments