summaryrefslogtreecommitdiffstats
path: root/travnik.py
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2024-07-29 22:32:56 +0200
committerAnton Luka Šijanec <anton@sijanec.eu>2024-07-29 22:32:56 +0200
commit82d25d2abddb3d9fb4a78949797f13a37d08ccfc (patch)
tree0b92ec9321afaae463d5f38d337de16b03036486 /travnik.py
parentpatcjh (diff)
downloadtravnik-master.tar
travnik-master.tar.gz
travnik-master.tar.bz2
travnik-master.tar.lz
travnik-master.tar.xz
travnik-master.tar.zst
travnik-master.zip
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