fix upgrading from old plugin config files
This commit is contained in:
parent
71aeb800da
commit
8305f6d68e
|
@ -264,9 +264,10 @@ class GajimPluginConfig():
|
|||
'%s and creating a new one' % (self.plugin.short_name,
|
||||
self.FILE_PATH + '.bak'))
|
||||
if os.path.exists(self.FILE_PATH + '.bak'):
|
||||
os.rename(self.FILE_PATH, self.FILE_PATH + '.bak')
|
||||
self.data = {}
|
||||
self.save()
|
||||
os.remove(self.FILE_PATH + '.bak')
|
||||
os.rename(self.FILE_PATH, self.FILE_PATH + '.bak')
|
||||
self.data = {}
|
||||
self.save()
|
||||
else:
|
||||
self.data = {}
|
||||
self.save()
|
||||
|
|
Loading…
Reference in New Issue