mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-06-08 03:12:33 +03:00
update.py: Check appcast version is correct platform
This commit is contained in:
parent
b38044928a
commit
eefb56c2c0
14
update.py
14
update.py
@ -178,8 +178,22 @@ class Updater(object):
|
|||||||
|
|
||||||
return None
|
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'):
|
for item in feed.findall('channel/item'):
|
||||||
ver = item.find('enclosure').attrib.get('{http://www.andymatuschak.org/xml-namespaces/sparkle}version')
|
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
|
# This will change A.B.C.D to A.B.C+D
|
||||||
sv = semantic_version.Version.coerce(ver)
|
sv = semantic_version.Version.coerce(ver)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user