remove old unencrypted secrets file

This commit is contained in:
Brendan Taylor 2007-09-29 20:51:38 +00:00
parent bd8ececb46
commit 289fd99e8e
2 changed files with 16 additions and 1 deletions

View File

@ -2,7 +2,7 @@ docdir = '../'
datadir = '../'
version = '0.11.2.0-svn'
version = '0.11.2.1-svn'
import sys, os.path
for base in ('.', 'common'):

View File

@ -166,6 +166,8 @@ class OptionsParser:
self.update_config_to_01114()
if old < [0, 11, 1, 5] and new >= [0, 11, 1, 5]:
self.update_config_to_01115()
if old < [0, 11, 2, 1] and new >= [0, 11, 2, 1]:
self.update_config_to_01121()
gajim.logger.init_vars()
gajim.config.set('version', new_version)
@ -479,3 +481,16 @@ class OptionsParser:
pass
con.close()
gajim.config.set('version', '0.11.1.5')
def update_config_to_01121(self):
# remove old unencrypted secrets file
from common.configpaths import gajimpaths
new_file = gajimpaths['SECRETS_FILE']
old_file = os.path.dirname(new_file) + '/secrets'
if os.path.exists(old_file):
os.remove(old_file)
gajim.config.set('version', '0.11.2.1')