diff options
author | Anton Luka Šijanec <anton@sijanec.eu> | 2024-07-29 22:32:56 +0200 |
---|---|---|
committer | Anton Luka Šijanec <anton@sijanec.eu> | 2024-07-29 22:32:56 +0200 |
commit | 82d25d2abddb3d9fb4a78949797f13a37d08ccfc (patch) | |
tree | 0b92ec9321afaae463d5f38d337de16b03036486 /travnik.py | |
parent | patcjh (diff) | |
download | travnik-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.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 |