check if all modules are available
This commit is contained in:
parent
c3441c8a10
commit
0c11681de3
1 changed files with 2 additions and 3 deletions
|
@ -65,9 +65,7 @@ def download():
|
||||||
return True
|
return True
|
||||||
release_data = get(RELEASE_URL)
|
release_data = get(RELEASE_URL)
|
||||||
release = json.loads(release_data)
|
release = json.loads(release_data)
|
||||||
old = settings.release['modules']['openmedialibrary']['version']
|
if verify(release):
|
||||||
new = release['modules']['openmedialibrary']['version']
|
|
||||||
if verify(release) and old < new:
|
|
||||||
ox.makedirs(settings.updates_path)
|
ox.makedirs(settings.updates_path)
|
||||||
os.chdir(os.path.dirname(settings.base_dir))
|
os.chdir(os.path.dirname(settings.base_dir))
|
||||||
current_files = {'release.json'}
|
current_files = {'release.json'}
|
||||||
|
@ -117,6 +115,7 @@ def install():
|
||||||
shutil.rmtree('%s_old' % module)
|
shutil.rmtree('%s_old' % module)
|
||||||
shutil.rmtree(new)
|
shutil.rmtree(new)
|
||||||
else:
|
else:
|
||||||
|
os.unlink(module_tar)
|
||||||
return False
|
return False
|
||||||
shutil.copy(os.path.join(settings.updates_path, 'release.json'), os.path.join(settings.config_path, 'release.json'))
|
shutil.copy(os.path.join(settings.updates_path, 'release.json'), os.path.join(settings.config_path, 'release.json'))
|
||||||
for cmd in [
|
for cmd in [
|
||||||
|
|
Loading…
Reference in a new issue