fix download
This commit is contained in:
parent
d32e1527a8
commit
ed70856172
1 changed files with 2 additions and 2 deletions
|
@ -45,7 +45,7 @@ def verify(release):
|
||||||
OpenSSL.crypto.verify(cert, tls_sig, value, digest)
|
OpenSSL.crypto.verify(cert, tls_sig, value, digest)
|
||||||
verified = True
|
verified = True
|
||||||
except OpenSSL.crypto.Error:
|
except OpenSSL.crypto.Error:
|
||||||
print('invalid tls signature')
|
logger.debug('invalid tls signature')
|
||||||
verified = False
|
verified = False
|
||||||
break
|
break
|
||||||
if 'signature' in release and not verified:
|
if 'signature' in release and not verified:
|
||||||
|
@ -127,9 +127,9 @@ def download():
|
||||||
os.chdir(os.path.dirname(settings.base_dir))
|
os.chdir(os.path.dirname(settings.base_dir))
|
||||||
current_files = {'release.json'}
|
current_files = {'release.json'}
|
||||||
for module in release['modules']:
|
for module in release['modules']:
|
||||||
|
module_tar = os.path.join(settings.updates_path, release['modules'][module]['name'])
|
||||||
if release['modules'][module].get('platform', platform) == platform and \
|
if release['modules'][module].get('platform', platform) == platform and \
|
||||||
release['modules'][module]['version'] > current_version(module):
|
release['modules'][module]['version'] > current_version(module):
|
||||||
module_tar = os.path.join(settings.updates_path, release['modules'][module]['name'])
|
|
||||||
base_url = settings.server.get('release_url').rsplit('/', 1)[0]
|
base_url = settings.server.get('release_url').rsplit('/', 1)[0]
|
||||||
url = '/'.join([base_url, release['modules'][module]['name']])
|
url = '/'.join([base_url, release['modules'][module]['name']])
|
||||||
if not os.path.exists(module_tar):
|
if not os.path.exists(module_tar):
|
||||||
|
|
Loading…
Reference in a new issue