[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
This commit is contained in:
parent
e1e0999de6
commit
e38f1173cf
|
@ -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 = (
|
||||
|
|
|
@ -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.'
|
||||
|
|
Loading…
Reference in New Issue