File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,8 +49,7 @@ def download_sa_advisories_from_rest_api(last_modified_timestamp: int) -> None:
4949
5050 print (f'fetching sa advisories modified after { last_modified_timestamp } ' )
5151 url = 'https://www.drupal.org/api-d7/node.json?type=sa&sort=changed&direction=DESC&field_is_psa=0'
52- fetch_again = True
53- while fetch_again :
52+ while True :
5453 print (f'fetching { url } ' )
5554 response = requests .get (url , headers = {'user-agent' : user_agent })
5655 if response .status_code == 200 :
@@ -67,16 +66,16 @@ def download_sa_advisories_from_rest_api(last_modified_timestamp: int) -> None:
6766 f .write ('\n ' )
6867 else :
6968 # We have reached the last modified entry.
70- fetch_again = False
69+ break
7170 print (' \\ - finished processing page' )
7271 if 'next' in data and data ['next' ] != '' :
7372 url = data ['next' ].replace ('api-d7/node?' , 'api-d7/node.json?' )
7473 else :
7574 print ('finished processing new and updated advisories' )
76- fetch_again = False
75+ break
7776 else :
7877 print (f'X API responded { response .status_code } ' )
79- fetch_again = False
78+ break
8079
8180
8281most_recent_changed_time = get_most_recent_changed_timestamp ()
You can’t perform that action at this time.
0 commit comments