From 66e87e5b316b0fa813c8446402944dde770e556e Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sat, 28 Aug 2010 16:42:00 +0200 Subject: preparation for plugin updates --- pyLoadCore.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'pyLoadCore.py') diff --git a/pyLoadCore.py b/pyLoadCore.py index f33cf3a1f..dd4741d3e 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -368,17 +368,18 @@ class Core(object): file_created = False else: file_created = False - if not file_exists and not quiet: - if file_created: - #self.log.info( _("%s created") % description ) - pass - else: - if not empty: - self.log.warning(_("could not find %(desc)s: %(name)s") % {"desc": description, "name": tmp_name}) + + if not file_exists and not quiet: + if file_created: + #self.log.info( _("%s created") % description ) + pass else: - print _("could not create %(desc)s: %(name)s") % {"desc": description, "name": tmp_name} - if essential: - exit() + if not empty: + self.log.warning(_("could not find %(desc)s: %(name)s") % {"desc": description, "name": tmp_name}) + else: + print _("could not create %(desc)s: %(name)s") % {"desc": description, "name": tmp_name} + if essential: + exit() def isClientConnected(self): return (self.lastClientConnected + 30) > time.time() @@ -520,7 +521,7 @@ class ServerMethods(): status['total'] = self.core.files.getFileCount() status['speed'] = 0 - for pyfile in [x.active for x in self.core.threadManager.threads if x.active]: + for pyfile in [x.active for x in self.core.threadManager.threads if x.active and x.active != "quit"]: status['speed'] += pyfile.getSpeed() status['download'] = not self.core.threadManager.pause and self.is_time_download() -- cgit v1.2.3