From 6cdb1ae0fe8f4faf897220d0520ca3e753e9f3e4 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 16 Apr 2015 17:48:30 +0200 Subject: [config] Use get method instead dict access --- pyload/manager/thread/Server.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'pyload/manager/thread') diff --git a/pyload/manager/thread/Server.py b/pyload/manager/thread/Server.py index b724ad2f9..48958f6fb 100644 --- a/pyload/manager/thread/Server.py +++ b/pyload/manager/thread/Server.py @@ -20,12 +20,12 @@ class WebServer(threading.Thread): self.core = pycore core = pycore self.running = True - self.server = pycore.config['webui']['server'] - self.https = pycore.config['webui']['https'] - self.cert = pycore.config["ssl"]["cert"] - self.key = pycore.config["ssl"]["key"] - self.host = pycore.config['webui']['host'] - self.port = pycore.config['webui']['port'] + self.server = pycore.config.get("webui", "server") + self.https = pycore.config.get("webui", "https") + self.cert = pycore.config.get("ssl", "cert") + self.key = pycore.config.get("ssl", "key") + self.host = pycore.config.get("webui", "host") + self.port = pycore.config.get("webui", "port") self.setDaemon(True) -- cgit v1.2.3 From 3eec058b29cc37af8ff116926d4273b377c7471b Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 16 Apr 2015 18:07:46 +0200 Subject: Fix comments --- pyload/manager/thread/Plugin.py | 6 +++--- pyload/manager/thread/Server.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'pyload/manager/thread') diff --git a/pyload/manager/thread/Plugin.py b/pyload/manager/thread/Plugin.py index 155e687d4..d5b4cfefe 100644 --- a/pyload/manager/thread/Plugin.py +++ b/pyload/manager/thread/Plugin.py @@ -27,7 +27,7 @@ class PluginThread(Thread): """Constructor""" Thread.__init__(self) self.setDaemon(True) - self.m = manager #thread manager + self.m = manager #: thread manager def writeDebugReport(self, pyfile): @@ -51,7 +51,7 @@ class PluginThread(Thread): pass info = zipfile.ZipInfo(fs_join(pyfile.pluginname, "debug_Report.txt"), gmtime()) - info.external_attr = 0644 << 16L # change permissions + info.external_attr = 0644 << 16L #: change permissions zip.writestr(info, dump) zip.close() @@ -94,7 +94,7 @@ class PluginThread(Thread): del frame - del stack #delete it just to be sure... + del stack #: delete it just to be sure... dump += "\n\nPLUGIN OBJECT DUMP: \n\n" diff --git a/pyload/manager/thread/Server.py b/pyload/manager/thread/Server.py index 48958f6fb..990325f5d 100644 --- a/pyload/manager/thread/Server.py +++ b/pyload/manager/thread/Server.py @@ -103,7 +103,7 @@ class WebServer(threading.Thread): try: webinterface.run_fcgi(host=self.host, port=self.port) - except ValueError: #@TODO: Fix https://github.com/pyload/pyload/issues/1145 + except ValueError: #@TODO: Fix https://github.com/pyload/pyload/issues/1145 pass -- cgit v1.2.3