use LooseVersion instead of StrictVersion (because "rc")

This commit is contained in:
Raymond Hill 2018-03-16 19:50:31 -04:00
parent b8607329b3
commit 6e84983514
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ import tempfile
import time import time
import zipfile import zipfile
from distutils.version import StrictVersion from distutils.version import LooseVersion
from string import Template from string import Template
# - Download target (raw) uBlock0.webext.xpi from GitHub # - Download target (raw) uBlock0.webext.xpi from GitHub
@ -250,7 +250,7 @@ with open(updates_json_filepath) as f:
updates_json = json.load(f) updates_json = json.load(f)
f.close() f.close()
previous_version = updates_json['addons'][extension_id]['updates'][0]['version'] previous_version = updates_json['addons'][extension_id]['updates'][0]['version']
if StrictVersion(version) > StrictVersion(previous_version): if LooseVersion(version) > LooseVersion(previous_version):
with open(os.path.join(projdir, 'platform', 'webext', 'updates.template.json')) as f: with open(os.path.join(projdir, 'platform', 'webext', 'updates.template.json')) as f:
template_json = Template(f.read()) template_json = Template(f.read())
f.close() f.close()