summaryrefslogtreecommitdiffstats
path: root/travnik.py
diff options
context:
space:
mode:
Diffstat (limited to 'travnik.py')
-rw-r--r--travnik.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/travnik.py b/travnik.py
index 5b273f8..3373e3c 100644
--- a/travnik.py
+++ b/travnik.py
@@ -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