mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-03 23:18:40 +00:00
Fix #1109 auto add halting when a torrent with invalid filename encoding is in the directory
This commit is contained in:
parent
0ffca9a1f6
commit
cfeae2baf4
1 changed files with 5 additions and 1 deletions
|
@ -75,7 +75,11 @@ class AutoAdd(component.Component):
|
||||||
|
|
||||||
for filename in os.listdir(self.config["autoadd_location"]):
|
for filename in os.listdir(self.config["autoadd_location"]):
|
||||||
if filename.split(".")[-1] == "torrent":
|
if filename.split(".")[-1] == "torrent":
|
||||||
|
try:
|
||||||
filepath = os.path.join(self.config["autoadd_location"], filename)
|
filepath = os.path.join(self.config["autoadd_location"], filename)
|
||||||
|
except UnicodeDecodeError, e:
|
||||||
|
log.error("Unable to auto add torrent due to inproper filename encoding: %s", e)
|
||||||
|
continue
|
||||||
try:
|
try:
|
||||||
filedump = self.load_torrent(filepath)
|
filedump = self.load_torrent(filepath)
|
||||||
except (RuntimeError, Exception), e:
|
except (RuntimeError, Exception), e:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue