Skip to content
Snippets Groups Projects
Commit fe82e887 authored by André's avatar André
Browse files

Optparser: Remove unneeded comparison

`new_version` passed to `update_config()` corresponds to the currently
running version of Gajim, i.e. it's the latest version compared to the
other versions mentioned in `update_config()`, that's why the
conditions `V('...') <= new_version` are always true and can be removed.
parent 62ecb9ca
No related branches found
No related tags found
No related merge requests found
......@@ -128,25 +128,24 @@ def write(self):
def update_config(self, old_version, new_version):
old = V(old_version)
new = V(new_version)
if old < V('0.16.4.1') <= new:
if old < V('0.16.4.1'):
self.update_config_to_01641()
if old < V('0.16.10.1') <= new:
if old < V('0.16.10.1'):
self.update_config_to_016101()
if old < V('0.16.10.2') <= new:
if old < V('0.16.10.2'):
self.update_config_to_016102()
if old < V('0.16.10.4') <= new:
if old < V('0.16.10.4'):
self.update_config_to_016104()
if old < V('0.16.10.5') <= new:
if old < V('0.16.10.5'):
self.update_config_to_016105()
if old < V('0.98.3') <= new:
if old < V('0.98.3'):
self.update_config_to_0983()
if old < V('1.1.93') <= new:
if old < V('1.1.93'):
self.update_config_to_1193()
if old < V('1.1.94') <= new:
if old < V('1.1.94'):
self.update_config_to_1194()
if old < V('1.1.95') <= new:
if old < V('1.1.95'):
self.update_config_to_1195()
app.config.set('version', new_version)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment