mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-17 13:56:47 +00:00
Fix #294 prevent deluge from crashing when autoload folder does not
exist
This commit is contained in:
parent
2be6c2a5ed
commit
5270d1fe4f
@ -1098,15 +1098,15 @@ of Deluge. Would you like to be taken to our download site?"))
|
|||||||
## Call via a timer to update the interface
|
## Call via a timer to update the interface
|
||||||
def update(self):
|
def update(self):
|
||||||
if self.config.get("autoload") and self.config.get("default_autoload_path"):
|
if self.config.get("autoload") and self.config.get("default_autoload_path"):
|
||||||
for filename in os.listdir(self.config.get("default_autoload_path")):
|
try:
|
||||||
if filename[-len(".torrent"):].lower() == ".torrent":
|
for filename in os.listdir(self.config.get("default_autoload_path")):
|
||||||
try:
|
if filename[-len(".torrent"):].lower() == ".torrent":
|
||||||
self.interactive_add_torrent_path(os.path.join(\
|
self.interactive_add_torrent_path(os.path.join(\
|
||||||
self.config.get("default_autoload_path"), filename), \
|
self.config.get("default_autoload_path"), filename), \
|
||||||
self.config.get("default_download_path"))
|
self.config.get("default_download_path"))
|
||||||
os.remove(os.path.join(self.config.get("default_autoload_path"), filename))
|
os.remove(os.path.join(self.config.get("default_autoload_path"), filename))
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
# Handle the events
|
# Handle the events
|
||||||
self.manager.handle_events()
|
self.manager.handle_events()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user