dont reuse variable
This commit is contained in:
parent
7ac7738c9e
commit
20dc20c727
1 changed files with 4 additions and 4 deletions
|
@ -98,9 +98,9 @@ def install():
|
||||||
return True
|
return True
|
||||||
with open(os.path.join(settings.updates_path, 'release.json')) as fd:
|
with open(os.path.join(settings.updates_path, 'release.json')) as fd:
|
||||||
release = json.load(fd)
|
release = json.load(fd)
|
||||||
old = current_version('openmedialibrary')
|
old_version = current_version('openmedialibrary')
|
||||||
new = release['modules']['openmedialibrary']['version']
|
new_version = release['modules']['openmedialibrary']['version']
|
||||||
if verify(release) and old < new:
|
if verify(release) and old_version < new_version:
|
||||||
os.chdir(os.path.dirname(settings.base_dir))
|
os.chdir(os.path.dirname(settings.base_dir))
|
||||||
for module in release['modules']:
|
for module in release['modules']:
|
||||||
if release['modules'][module]['version'] > current_version(module):
|
if release['modules'][module]['version'] > current_version(module):
|
||||||
|
@ -128,7 +128,7 @@ def install():
|
||||||
for cmd in [
|
for cmd in [
|
||||||
['./ctl', 'stop'],
|
['./ctl', 'stop'],
|
||||||
['./ctl', 'setup'],
|
['./ctl', 'setup'],
|
||||||
['./ctl', 'postupdate', '-o', old, '-n', new]
|
['./ctl', 'postupdate', '-o', old_version, '-n', new_version]
|
||||||
]:
|
]:
|
||||||
subprocess.call(cmd)
|
subprocess.call(cmd)
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Reference in a new issue