summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar spoob <spoob@gmx.de> 2009-06-01 20:38:58 +0200
committerGravatar spoob <spoob@gmx.de> 2009-06-01 20:38:58 +0200
commit8a56bcfb652ee9145ba9fb344a2b8f74746f1f44 (patch)
tree73f63c690c37629e3cd7d1fe8b5d6268506bfd6e
parentreconnect, not working, dont try it out (diff)
downloadpyload-8a56bcfb652ee9145ba9fb344a2b8f74746f1f44.tar.xz
fixed no log folder bug, more logs instead of prints
-rw-r--r--Core.py23
-rw-r--r--config2
2 files changed, 13 insertions, 12 deletions
diff --git a/Core.py b/Core.py
index fdec3a084..b37288491 100644
--- a/Core.py
+++ b/Core.py
@@ -55,18 +55,19 @@ class Core(object):
translation = gettext.translation("pyLoad", "locale", languages=[self.config['language']])
translation.install(unicode=True)
-
- print _("Downloadtime:"), self.is_dltime() # debug only
+
self.init_logger(logging.DEBUG) # logging level
- self.thread_list = Thread_List(self)
+ self.check_update()
+ self.logger.info(_("Downloadtime: %s") % self.is_dltime()) # debug only
+
+ self.thread_list = Thread_List(self)
+
+ #self.check_create(self.config['log_folder'], _("folder for logs"))
self.check_create(self.config['download_folder'], _("folder for downloads"))
- self.check_create(self.config['log_folder'], _("folder for logs"))
self.check_create(self.config['link_file'], _("file for links"), False)
- self.check_update()
-
path.append(self.config['plugin_folder'])
self.create_plugin_index()
@@ -99,7 +100,7 @@ class Core(object):
if plugin_pattern != "":
self.plugins_avaible[plugin_file] = plugin_pattern
self.logger.debug(plugin_file + _(" added"))
- self.logger.debug(_("created index of plugins"))
+ self.logger.info(_("created index of plugins"))
## def check_needed_plugins(self):
## links = open(self.link_file, 'r').readlines()
@@ -145,11 +146,11 @@ class Core(object):
"""
newst_version = urllib2.urlopen("http://pyload.nady.biz/files/version.txt").readline().strip()
if CURRENT_VERSION < newst_version:
- print _("new update %s on pyload.org") % newst_version #newer version out
+ self.logger.info(_("new update %s on pyload.org") % newst_version) #newer version out
elif CURRENT_VERSION == newst_version:
- print _("newst version %s in use:") % CURRENT_VERSION #using newst version
+ self.logger.info(_("newst version %s in use:") % CURRENT_VERSION) #using newst version
else:
- print _("beta version %s in use:") % CURRENT_VERSION #using beta version
+ self.logger.info( _("beta version %s in use:") % CURRENT_VERSION) #using beta version
def check_create(self, check_name, legend, folder=True):
if not exists(check_name):
@@ -158,7 +159,7 @@ class Core(object):
mkdir(check_name)
else:
open(check_name, "w")
- self.logger.debug(legend, _("created"))
+ self.logger.debug(_("%s created") % legend)
except:
self.logger.debug(_("could %s not create ") % legend)
exit()
diff --git a/config b/config
index 98201ac97..fb6db7792 100644
--- a/config
+++ b/config
@@ -14,6 +14,6 @@ fullLog = True
start = 0:00
end = 6:00
[remote]
-remote_activated = True
+remote_activated = False
port = 7272
remotePassword = pwhere