diff options
Diffstat (limited to '')
-rw-r--r-- | travnik.py | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -136,8 +136,12 @@ class Torrent(): def glob(d): r = {} for f in scandir(d): - if f.name.endswith(".torrent") and f.is_file(): - t = Torrent() - t.file(f.path) - r[t.sha1] = t + try: + if f.name.endswith(".torrent") and f.is_file(): + t = Torrent() + t.file(f.path) + r[t.sha1] = t + except Exception as e: + print(f"skipping broken torrent {f.name} due to exception:") + print(e) return r |