We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a0f0f26 commit 88ed8ceCopy full SHA for 88ed8ce
xklb/createdb/torrents_add.py
@@ -41,7 +41,12 @@ def get_tracker(torrent):
41
def extract_metadata(path):
42
from torrentool.api import Torrent
43
44
- torrent = Torrent.from_file(path)
+ try:
45
+ torrent = Torrent.from_file(path)
46
+ assert torrent.files
47
+ except Exception:
48
+ log.error('[%s]: corrupt or empty torrent', path)
49
+ raise
50
51
file_sizes = [f.length for f in torrent.files]
52
@@ -80,8 +85,6 @@ def extract_metadata(path):
80
85
def torrents_add():
81
86
args = parse_args()
82
87
83
- duplicates = {}
84
-
88
scanned_set = set(arg_utils.gen_paths(args, default_exts=(".torrent",)))
89
90
try:
0 commit comments