better parse of version in config file in case old sha version of git is

used (-xyz instead of +xyz)
This commit is contained in:
Yann Leboulanger 2017-11-30 17:19:17 +01:00
parent 46711e1107
commit 79ba81825d
1 changed files with 4 additions and 1 deletions

View File

@ -82,7 +82,10 @@ class OptionsParser:
app.config.set_per(optname, key, subname, value)
old_version = app.config.get('version')
old_version = old_version.split('+', 1)[0]
if '+' in old_version:
old_version = old_version.split('+', 1)[0]
elif '-' in old_version:
old_version = old_version.split('-', 1)[0]
self.update_config(old_version, new_version)
self.old_values = {} # clean mem