From d39a7dd23497943dd853d585e7976cdb46fc7877 Mon Sep 17 00:00:00 2001 From: clinton-hall Date: Tue, 18 Jun 2019 20:52:19 +1200 Subject: [PATCH] fix to make deluge client py 2 and 3 compatible. Fixes #1626 --- libs/custom/synchronousdeluge/client.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/custom/synchronousdeluge/client.py b/libs/custom/synchronousdeluge/client.py index 191c70f6..0418e806 100644 --- a/libs/custom/synchronousdeluge/client.py +++ b/libs/custom/synchronousdeluge/client.py @@ -82,13 +82,13 @@ class DelugeClient(object): def func(obj, *args, **kwargs): return self.remote_call(fullname, *args, **kwargs) - func.__name__ = method + func.__name__ = str(method) return func def _introspect(self): def splitter(value): - return value.split('.') + return value.split(b'.') self.modules = [] @@ -100,8 +100,8 @@ class DelugeClient(object): for module, methods in methodmap.items(): clsname = 'DelugeModule{0}'.format(module.capitalize()) - cls = type(clsname, (), methods) - setattr(self, module, cls()) + cls = type(str(clsname), (), methods) + setattr(self, str(module), cls()) self.modules.append(module) def remote_call(self, method, *args, **kwargs):