From 80c8e5b71f2f62f9c508c6084ae03cc3a3d0dbe1 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Fri, 31 Mar 2017 23:45:12 -0500 Subject: [PATCH] Cleanup EW6 invalid directory messages. --- openlp/plugins/songs/lib/importers/easyworship.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/openlp/plugins/songs/lib/importers/easyworship.py b/openlp/plugins/songs/lib/importers/easyworship.py index 5c9b9abba..03f671c52 100644 --- a/openlp/plugins/songs/lib/importers/easyworship.py +++ b/openlp/plugins/songs/lib/importers/easyworship.py @@ -364,15 +364,13 @@ class EasyWorshipSongImport(SongImport): """ songs_db_path = self._find_file(self.import_source, ["Databases", "Data", "Songs.db"]) song_words_db_path = self._find_file(self.import_source, ["Databases", "Data", "SongWords.db"]) + invalid_dir_msg = 'This does not appear to be a valid Easy Worship 6 database directory.' # check to see if needed files are there if not os.path.isfile(songs_db_path): - self.log_error(songs_db_path, translate('SongsPlugin.EasyWorshipSongImport', - 'This file does not exist.')) + self.log_error(songs_db_path, translate('SongsPlugin.EasyWorshipSongImport', invalid_dir_msg)) return if not os.path.isfile(song_words_db_path): - self.log_error(song_words_db_path, translate('SongsPlugin.EasyWorshipSongImport', - 'This does not appear to be a Easy Worship 6 database ' - 'directory.')) + self.log_error(song_words_db_path, translate('SongsPlugin.EasyWorshipSongImport', invalid_dir_msg)) return # get database handles songs_conn = sqlite3.connect(songs_db_path)