From e38f1173cf470f2f8373f2fa4edbb726c932c980 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Mon, 22 Feb 2021 10:56:35 +0000 Subject: [PATCH] [Notifications] Fix email KeyError with status name Fix user reported error: Notification failure using email: [Failure instance: Traceback: : 'name' This was due to using empty dict used with get_status where a list of keys is now required or the all_keys parameter is used. Fixes: #3303 --- deluge/plugins/Notifications/deluge_notifications/core.py | 2 +- deluge/plugins/Notifications/setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deluge/plugins/Notifications/deluge_notifications/core.py b/deluge/plugins/Notifications/deluge_notifications/core.py index 123f9cf05..9eede4576 100644 --- a/deluge/plugins/Notifications/deluge_notifications/core.py +++ b/deluge/plugins/Notifications/deluge_notifications/core.py @@ -176,7 +176,7 @@ Date: %(date)s def _on_torrent_finished_event(self, torrent_id): log.debug('Handler for TorrentFinishedEvent called for CORE') torrent = component.get('TorrentManager')[torrent_id] - torrent_status = torrent.get_status({}) + torrent_status = torrent.get_status(['name', 'num_files']) # Email subject = _('Finished Torrent "%(name)s"') % torrent_status message = ( diff --git a/deluge/plugins/Notifications/setup.py b/deluge/plugins/Notifications/setup.py index d9a9e4227..2b2f5aebc 100755 --- a/deluge/plugins/Notifications/setup.py +++ b/deluge/plugins/Notifications/setup.py @@ -17,7 +17,7 @@ from setuptools import find_packages, setup __plugin_name__ = 'Notifications' __author__ = 'Pedro Algarvio' __author_email__ = 'pedro@algarvio.me' -__version__ = '0.3' +__version__ = '0.4' __url__ = 'http://dev.deluge-torrent.org/' __license__ = 'GPLv3' __description__ = 'Plugin which provides notifications to Deluge.'