1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-17 01:22:19 +03:00

update.py: Check appcast version is correct platform

This commit is contained in:
Athanasius 2022-12-04 14:30:37 +00:00
parent b38044928a
commit eefb56c2c0
No known key found for this signature in database
GPG Key ID: 772697E181BB2767

@ -178,8 +178,22 @@ class Updater(object):
return None
if sys.platform == 'darwin':
sparkle_platform = 'macos'
else:
# For *these* purposes anything else is the same as 'windows', as
# non-win32 would be running from source.
sparkle_platform = 'windows'
for item in feed.findall('channel/item'):
ver = item.find('enclosure').attrib.get('{http://www.andymatuschak.org/xml-namespaces/sparkle}version')
ver_platform = item.find('enclosure').attrib.get(
'{http://www.andymatuschak.org/xml-namespaces/sparkle}os'
)
if ver_platform != sparkle_platform:
continue
# This will change A.B.C.D to A.B.C+D
sv = semantic_version.Version.coerce(ver)