fix: Add next() to get the first entry from the filter

This commit is contained in:
Sayantan Santra 2024-03-02 19:09:20 -06:00
parent 03d07c13b1
commit 64e59fef33
Signed by: SinTan1729
GPG Key ID: EB3E68BFBA25C85F
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ def update_tools(appstate):
for item in ['revanced-cli', 'revanced-integrations', 'revanced-patches']:
print(f"Checking updates for {item}...")
tools = appstate['tools']
tool = filter(lambda x: x['repository'] == 'revanced/'+item and x['content_type'] not in ['application/pgp-keys', 'application/json'], tools)
tool = next(filter(lambda x: x['repository'] == 'revanced/'+item and x['content_type'] not in ['application/pgp-keys', 'application/json'], tools))
latest_ver = Version(tool['version'])
try: