From 5270d1fe4fe9ef1688722d567f4632925fefbf01 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Tue, 24 Jun 2008 09:10:25 +0000 Subject: [PATCH] Fix #294 prevent deluge from crashing when autoload folder does not exist --- src/interface.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/interface.py b/src/interface.py index a9c00d93f..a928b5339 100644 --- a/src/interface.py +++ b/src/interface.py @@ -1098,15 +1098,15 @@ of Deluge. Would you like to be taken to our download site?")) ## Call via a timer to update the interface def update(self): if self.config.get("autoload") and self.config.get("default_autoload_path"): - for filename in os.listdir(self.config.get("default_autoload_path")): - if filename[-len(".torrent"):].lower() == ".torrent": - try: + try: + for filename in os.listdir(self.config.get("default_autoload_path")): + if filename[-len(".torrent"):].lower() == ".torrent": self.interactive_add_torrent_path(os.path.join(\ self.config.get("default_autoload_path"), filename), \ self.config.get("default_download_path")) os.remove(os.path.join(self.config.get("default_autoload_path"), filename)) - except: - pass + except: + pass # Handle the events self.manager.handle_events()