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

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: