Skip to content

Commit e6cdf39

Browse files
torrent.torrent_info can be None
1 parent c3445ea commit e6cdf39

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

defaulttrackers/core.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
import deluge.component as component
4444
import deluge.configmanager
4545
from deluge.core.rpcserver import export
46-
from pprint import pprint
4746

4847
DEFAULT_PREFS = {
4948
"trackers": [
@@ -70,7 +69,7 @@ def update(self):
7069

7170
def on_torrent_added(self, torrent_id):
7271
torrent = component.get("TorrentManager")[torrent_id]
73-
if torrent.torrent_info.priv() or torrent.get_status(["private"])["private"]:
72+
if (torrent.torrent_info and torrent.torrent_info.priv()) or torrent.get_status(["private"])["private"]:
7473
return
7574
trackers = torrent.get_status(["trackers"])["trackers"]
7675
existing_urls = [tracker["url"] for tracker in trackers]

0 commit comments

Comments
 (0)