diff options
author | spoob <spoob@gmx.de> | 2009-08-12 20:08:03 +0200 |
---|---|---|
committer | spoob <spoob@gmx.de> | 2009-08-12 20:08:03 +0200 |
commit | 0336919f4ce067333462a2c6e196daf6a4062a6a (patch) | |
tree | ff75ea9b13e0eca236b87cbcfe1455c49a457546 | |
parent | moved update service to update.pyload.org (diff) | |
download | pyload-0.1.1.tar.xz |
added debug mode0.1.1
-rw-r--r-- | config | 3 | ||||
-rw-r--r-- | module/file_list.py | 12 | ||||
-rw-r--r-- | pyLoadCore.py | 6 |
3 files changed, 11 insertions, 10 deletions
@@ -15,6 +15,7 @@ use_reconnect = False link_file = links.txt failed_file = failed_links.txt reconnect_method = reconnect_method +debug_mode = False [updates] search_updates = True @@ -31,4 +32,4 @@ end = 0:00 [proxy] useproxy = False proxyadress = http://localhost:8080 -proxyprotocol = http
\ No newline at end of file +proxyprotocol = http diff --git a/module/file_list.py b/module/file_list.py index d3af2c1b2..8c1c32564 100644 --- a/module/file_list.py +++ b/module/file_list.py @@ -56,14 +56,12 @@ class File_List(object): self.append(url) def remove(self, pyfile): + if not self.config['debug_mode']: + if pyfile in self.files: + self.files.remove(pyfile) - pass - # - #if pyfile in self.files: - #self.files.remove(pyfile) -# - #self.data['order'].remove(pyfile.id) - #del self.data[pyfile.id] + self.data['order'].remove(pyfile.id) + del self.data[pyfile.id] def remove_id(self, pyid): #also abort download diff --git a/pyLoadCore.py b/pyLoadCore.py index c7c5140c2..8805905de 100644 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -62,8 +62,10 @@ class Core(object): self.check_create(self.config['link_file'], _("file for links"), False) self.check_create(self.config['failed_file'], _("file for failed links"), False) - self.init_logger(logging.DEBUG) # logging level - + if self.config['debug_mode']: + self.init_logger(logging.DEBUG) # logging level + else: + self.init_logger(logging.INFO) # logging level self.check_update() |