Migrate config for new password identifier + version bump
This commit is contained in:
parent
0d37609d8a
commit
f1e95825c6
|
@ -1,6 +1,6 @@
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
__version__ = "0.98.2"
|
__version__ = "0.98.3"
|
||||||
|
|
||||||
try:
|
try:
|
||||||
node = subprocess.Popen('git rev-parse --short=12 HEAD', shell=True,
|
node = subprocess.Popen('git rev-parse --short=12 HEAD', shell=True,
|
||||||
|
|
|
@ -249,6 +249,8 @@ class OptionsParser:
|
||||||
self.update_config_to_016112()
|
self.update_config_to_016112()
|
||||||
if old < [0, 98, 2] and new >= [0, 98, 2]:
|
if old < [0, 98, 2] and new >= [0, 98, 2]:
|
||||||
self.update_config_to_0982()
|
self.update_config_to_0982()
|
||||||
|
if old < [0, 98, 3] and new >= [0, 98, 3]:
|
||||||
|
self.update_config_to_0983()
|
||||||
|
|
||||||
app.logger.init_vars()
|
app.logger.init_vars()
|
||||||
app.logger.attach_cache_database()
|
app.logger.attach_cache_database()
|
||||||
|
@ -924,3 +926,12 @@ class OptionsParser:
|
||||||
'''
|
'''
|
||||||
)
|
)
|
||||||
app.config.set('version', '0.98.2')
|
app.config.set('version', '0.98.2')
|
||||||
|
|
||||||
|
def update_config_to_0983(self):
|
||||||
|
for account in self.old_values['accounts'].keys():
|
||||||
|
password = self.old_values['accounts'][account]['password']
|
||||||
|
if password == "winvault:":
|
||||||
|
app.config.set_per('accounts', account, 'password', 'keyring:')
|
||||||
|
elif password == "libsecret:":
|
||||||
|
app.config.set_per('accounts', account, 'password', '')
|
||||||
|
app.config.set('version', '0.98.3')
|
||||||
|
|
Loading…
Reference in New Issue