Fix AcronymsExpander plugin
This commit is contained in:
parent
0b2f3b103d
commit
0a77bb574f
1 changed files with 3 additions and 0 deletions
|
@ -25,6 +25,7 @@ Acronyms expander plugin.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
import os
|
||||||
|
|
||||||
from gi.repository import Gtk
|
from gi.repository import Gtk
|
||||||
from gi.repository import GObject
|
from gi.repository import GObject
|
||||||
|
@ -63,6 +64,8 @@ class AcronymsExpanderPlugin(GajimPlugin):
|
||||||
@log_calls('AcronymsExpanderPlugin')
|
@log_calls('AcronymsExpanderPlugin')
|
||||||
def get_own_acronyms_list(self):
|
def get_own_acronyms_list(self):
|
||||||
data_file = self.local_file_path('acronyms')
|
data_file = self.local_file_path('acronyms')
|
||||||
|
if not os.path.isfile(data_file):
|
||||||
|
return {}
|
||||||
data = open(data_file, 'r')
|
data = open(data_file, 'r')
|
||||||
acronyms = eval(data.read())
|
acronyms = eval(data.read())
|
||||||
data.close()
|
data.close()
|
||||||
|
|
Loading…
Add table
Reference in a new issue