dont reuse variable

This commit is contained in:
j 2015-11-17 14:21:05 +01:00
parent 7ac7738c9e
commit 20dc20c727
1 changed files with 4 additions and 4 deletions

View File

@ -98,9 +98,9 @@ def install():
return True
with open(os.path.join(settings.updates_path, 'release.json')) as fd:
release = json.load(fd)
old = current_version('openmedialibrary')
new = release['modules']['openmedialibrary']['version']
if verify(release) and old < new:
old_version = current_version('openmedialibrary')
new_version = release['modules']['openmedialibrary']['version']
if verify(release) and old_version < new_version:
os.chdir(os.path.dirname(settings.base_dir))
for module in release['modules']:
if release['modules'][module]['version'] > current_version(module):
@ -128,7 +128,7 @@ def install():
for cmd in [
['./ctl', 'stop'],
['./ctl', 'setup'],
['./ctl', 'postupdate', '-o', old, '-n', new]
['./ctl', 'postupdate', '-o', old_version, '-n', new_version]
]:
subprocess.call(cmd)
return True