diff options
author | Calum Lind <calumlind+deluge@gmail.com> | 2021-02-22 10:56:35 +0000 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2021-08-01 08:43:37 +0100 |
commit | e38f1173cf470f2f8373f2fa4edbb726c932c980 (patch) | |
tree | f6523dd1b2115065b91c4305baf5f27cf064c2ec | |
parent | e1e0999de6575519be3567e72f65b3927bb9f362 (diff) | |
download | deluge-e38f1173cf470f2f8373f2fa4edbb726c932c980.tar.gz deluge-e38f1173cf470f2f8373f2fa4edbb726c932c980.tar.bz2 deluge-e38f1173cf470f2f8373f2fa4edbb726c932c980.zip |
[Notifications] Fix email KeyError with status name
Fix user reported error:
Notification failure using email:
[Failure instance: Traceback: <class 'KeyError'>: '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
-rw-r--r-- | deluge/plugins/Notifications/deluge_notifications/core.py | 2 | ||||
-rwxr-xr-x | 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.' |