Skip to content

Commit a243c9a

Browse files
committed
refactor: eliminate last else
1 parent 91353bf commit a243c9a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

scripts/download_sa_advisories.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ def download_sa_advisories_from_rest_api(last_modified_timestamp: int) -> None:
7171
json.dump(item, f)
7272
f.write('\n')
7373
print(' \\- finished processing page')
74-
if 'next' in data and data['next'] != '':
75-
url = data['next'].replace('api-d7/node?', 'api-d7/node.json?')
76-
else:
74+
75+
url = data.get('next', '').replace('api-d7/node?', 'api-d7/node.json?')
76+
if url == '':
7777
print('finished processing new and updated advisories')
7878
break
7979

0 commit comments

Comments
 (0)