From 0a77bb574ffb6205870418ccfe7bdf7f60ab3c28 Mon Sep 17 00:00:00 2001 From: Denis Fomin Date: Sat, 31 May 2014 11:46:47 +0400 Subject: [PATCH] Fix AcronymsExpander plugin --- plugins/acronyms_expander/acronyms_expander.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/acronyms_expander/acronyms_expander.py b/plugins/acronyms_expander/acronyms_expander.py index 834cc4f9a..4333c532b 100644 --- a/plugins/acronyms_expander/acronyms_expander.py +++ b/plugins/acronyms_expander/acronyms_expander.py @@ -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()