diff --git a/deluge/core/torrentmanager.py b/deluge/core/torrentmanager.py index 8f96f3e02..7c8cd0a53 100644 --- a/deluge/core/torrentmanager.py +++ b/deluge/core/torrentmanager.py @@ -747,7 +747,8 @@ class TorrentManager(component.Component): def on_alert_state_changed(self, alert): log.debug("on_alert_state_changed") try: - torrent = self.torrents[str(alert.handle.info_hash())] + torrent_id = str(alert.handle.info_hash()) + torrent = self.torrents[torrent_id] except: return