Catch snd_path is None error in Notification Plugin

This commit is contained in:
Calum Lind 2011-06-04 23:24:39 +01:00
parent d3e8afdda1
commit 16d27b9657
1 changed files with 9 additions and 7 deletions

View File

@ -443,13 +443,15 @@ class GtkUI(GtkPluginBase, GtkUiNotifications):
snd_path = self.config['custom_sounds'][event_name]
else:
snd_path = self.config['sound_path']
self.sounds_model.set(
self.sounds_model.append(),
SND_EVENT, event_name,
SND_EVENT_DOC, event_doc,
SND_NAME, basename(snd_path),
SND_PATH, snd_path
)
if snd_path:
self.sounds_model.set(
self.sounds_model.append(),
SND_EVENT, event_name,
SND_EVENT_DOC, event_doc,
SND_NAME, basename(snd_path),
SND_PATH, snd_path
)
def populate_subscriptions(self, handled_events, email_subscriptions=[]):
subscriptions_dict = self.config['subscriptions']