Fix AcronymsExpander plugin

This commit is contained in:
Denis Fomin 2014-05-31 11:46:47 +04:00
parent 0b2f3b103d
commit 0a77bb574f
1 changed files with 3 additions and 0 deletions

View File

@ -25,6 +25,7 @@ Acronyms expander plugin.
'''
import sys
import os
from gi.repository import Gtk
from gi.repository import GObject
@ -63,6 +64,8 @@ class AcronymsExpanderPlugin(GajimPlugin):
@log_calls('AcronymsExpanderPlugin')
def get_own_acronyms_list(self):
data_file = self.local_file_path('acronyms')
if not os.path.isfile(data_file):
return {}
data = open(data_file, 'r')
acronyms = eval(data.read())
data.close()