Catch snd_path is None error in Notification Plugin
This commit is contained in:
parent
5b1e43735b
commit
2186fdb870
|
@ -441,13 +441,15 @@ class GtkUI(GtkPluginBase, GtkUiNotifications):
|
||||||
snd_path = self.config['custom_sounds'][event_name]
|
snd_path = self.config['custom_sounds'][event_name]
|
||||||
else:
|
else:
|
||||||
snd_path = self.config['sound_path']
|
snd_path = self.config['sound_path']
|
||||||
self.sounds_model.set(
|
|
||||||
self.sounds_model.append(),
|
if snd_path:
|
||||||
SND_EVENT, event_name,
|
self.sounds_model.set(
|
||||||
SND_EVENT_DOC, event_doc,
|
self.sounds_model.append(),
|
||||||
SND_NAME, basename(snd_path),
|
SND_EVENT, event_name,
|
||||||
SND_PATH, snd_path
|
SND_EVENT_DOC, event_doc,
|
||||||
)
|
SND_NAME, basename(snd_path),
|
||||||
|
SND_PATH, snd_path
|
||||||
|
)
|
||||||
|
|
||||||
def populate_subscriptions(self, handled_events, email_subscriptions=[]):
|
def populate_subscriptions(self, handled_events, email_subscriptions=[]):
|
||||||
subscriptions_dict = self.config['subscriptions']
|
subscriptions_dict = self.config['subscriptions']
|
||||||
|
|
Loading…
Reference in New Issue