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/remote/ThriftBackend.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pyload/remote/ThriftBackend.py') diff --git a/pyload/remote/ThriftBackend.py b/pyload/remote/ThriftBackend.py index 83bb83811..adb168df2 100644 --- a/pyload/remote/ThriftBackend.py +++ b/pyload/remote/ThriftBackend.py @@ -21,11 +21,11 @@ class ThriftBackend(BackendBase): key = None cert = None - if self.core.config['ssl']['activated']: - if exists(self.core.config['ssl']['cert']) and exists(self.core.config['ssl']['key']): + if self.core.config.get("ssl", "activated"): + if exists(self.core.config.get("ssl", "cert")) and exists(self.core.config.get("ssl", "key")): self.core.log.info(_("Using SSL ThriftBackend")) - key = self.core.config['ssl']['key'] - cert = self.core.config['ssl']['cert'] + key = self.core.config.get("ssl", "key") + cert = self.core.config.get("ssl", "cert") transport = ServerSocket(port, host, key, cert) -- 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/remote/ThriftBackend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pyload/remote/ThriftBackend.py') diff --git a/pyload/remote/ThriftBackend.py b/pyload/remote/ThriftBackend.py index adb168df2..0ac7f1bb5 100644 --- a/pyload/remote/ThriftBackend.py +++ b/pyload/remote/ThriftBackend.py @@ -9,7 +9,7 @@ from pyload.remote.thriftbackend.Processor import Processor from pyload.remote.thriftbackend.Protocol import ProtocolFactory from pyload.remote.thriftbackend.Socket import ServerSocket from pyload.remote.thriftbackend.Transport import TransportFactory -#from pyload.remote.thriftbackend.Transport import TransportFactoryCompressed +# from pyload.remote.thriftbackend.Transport import TransportFactoryCompressed from thrift.server import TServer -- cgit v1.2.3