diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-03-09 18:22:41 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-03-09 18:22:41 +0100 |
commit | 0aaa4f998211e8c63d6b43d3a36fe7d6b561a36f (patch) | |
tree | ecd879a022d52c152cd73238eecb0a51ba51e36e | |
parent | fix (diff) | |
download | pyload-0aaa4f998211e8c63d6b43d3a36fe7d6b561a36f.tar.xz |
several fixes, closed #84
-rw-r--r-- | module/HookManager.py | 11 | ||||
-rw-r--r-- | module/config/plugin_default.xml | 2 | ||||
-rw-r--r-- | module/plugins/hooks/LinuxFileEvents.py | 4 | ||||
-rw-r--r-- | module/web/ServerThread.py | 3 | ||||
-rw-r--r-- | module/web/templates/default/login.html | 2 | ||||
-rwxr-xr-x | pyLoadCore.py | 8 |
6 files changed, 19 insertions, 11 deletions
diff --git a/module/HookManager.py b/module/HookManager.py index 01d191ce4..279fdbaa7 100644 --- a/module/HookManager.py +++ b/module/HookManager.py @@ -53,10 +53,13 @@ class HookManager(): self.configParser.set(pluginName, {"option": "activated", "type": "bool", "name": "Activated"}, True) module = __import__("module.plugins.hooks." + pluginName, globals(), locals(), [pluginName], -1) pluginClass = getattr(module, pluginName) - plugin = pluginClass(self.core) - plugin.readConfig() - plugins.append(plugin) - self.logger.info("Activated %s" % pluginName) + try: + plugin = pluginClass(self.core) + plugin.readConfig() + plugins.append(plugin) + self.logger.info("Activated %s" % pluginName) + except: + self.logger.warning("Failed activating %s" % pluginName) self.plugins = plugins self.lock.release() diff --git a/module/config/plugin_default.xml b/module/config/plugin_default.xml index 0b0cd1949..c1261e338 100644 --- a/module/config/plugin_default.xml +++ b/module/config/plugin_default.xml @@ -2,7 +2,7 @@ <config name="Configuration" version="0.1"> <RapidshareCom> <server input=";Cogent;Deutsche Telekom;Level(3);Level(3) #2;GlobalCrossing;Level(3) #3;Teleglobe;GlobalCrossing #2;TeliaSonera #2;Teleglobe #2;TeliaSonera #3;TeliaSonera"></server> - <premium>True</premium> + <premium>False</premium> <username></username> <password></password> </RapidshareCom> diff --git a/module/plugins/hooks/LinuxFileEvents.py b/module/plugins/hooks/LinuxFileEvents.py index ed206866a..da1b06f13 100644 --- a/module/plugins/hooks/LinuxFileEvents.py +++ b/module/plugins/hooks/LinuxFileEvents.py @@ -31,7 +31,9 @@ class LinuxFileEvents(Hook): props['author_name'] = ("mkaay") props['author_mail'] = ("mkaay@mkaay.de") self.props = props - + + return #@TODO remove when working correctly + if not os.name == "posix": return diff --git a/module/web/ServerThread.py b/module/web/ServerThread.py index ffd6a2d35..49fd9b055 100644 --- a/module/web/ServerThread.py +++ b/module/web/ServerThread.py @@ -38,7 +38,7 @@ class WebServer(threading.Thread): except Exception: self.lighttpd = False - if self.lighttpd and self.pycore.config['webinterface']['lighttpd']: + if self.lighttpd: self.pycore.logger.info("Starting lighttpd Webserver: %s:%s" % (host, port)) config = file(join(path, "lighttpd", "lighttpd_default.conf"), "rb") content = config.readlines() @@ -79,6 +79,7 @@ class WebServer(threading.Thread): else: self.p.kill() + return True except: pass diff --git a/module/web/templates/default/login.html b/module/web/templates/default/login.html index 185245f67..2f93e5aab 100644 --- a/module/web/templates/default/login.html +++ b/module/web/templates/default/login.html @@ -27,7 +27,7 @@ </form> {% if form.errors %} -<p{% trans "Your username and password didn't match. Please try again." %}</p> +<p>{% trans "Your username and password didn't match. Please try again." %}</p> {% endif %} </div> diff --git a/pyLoadCore.py b/pyLoadCore.py index 5a222c0d3..a9283872f 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -18,9 +18,9 @@ @author: sebnapi @author: RaNaN @author: mkaay - @version: v0.3.1 + @version: v0.3.2 """ -CURRENT_VERSION = '0.3.1' +CURRENT_VERSION = '0.3.2' from getopt import getopt import gettext @@ -150,7 +150,7 @@ class Core(object): self.captchaManager = CaptchaManager(self) self.last_update_check = 0 - self.update_check_interval = 1800 + self.update_check_interval = 6 * 60 * 60 self.update_available = self.check_update() self.logger.info(_("Downloadtime: %s") % self.server_methods.is_time_download()) @@ -354,6 +354,8 @@ class Core(object): return True else: return False + except: + pass finally: self.last_update_check = time.time() |