mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 05:13:16 -07:00
fix to make deluge client py 2 and 3 compatible. Fixes #1626
This commit is contained in:
parent
81895afd3f
commit
d39a7dd234
1 changed files with 4 additions and 4 deletions
|
@ -82,13 +82,13 @@ class DelugeClient(object):
|
||||||
def func(obj, *args, **kwargs):
|
def func(obj, *args, **kwargs):
|
||||||
return self.remote_call(fullname, *args, **kwargs)
|
return self.remote_call(fullname, *args, **kwargs)
|
||||||
|
|
||||||
func.__name__ = method
|
func.__name__ = str(method)
|
||||||
|
|
||||||
return func
|
return func
|
||||||
|
|
||||||
def _introspect(self):
|
def _introspect(self):
|
||||||
def splitter(value):
|
def splitter(value):
|
||||||
return value.split('.')
|
return value.split(b'.')
|
||||||
|
|
||||||
self.modules = []
|
self.modules = []
|
||||||
|
|
||||||
|
@ -100,8 +100,8 @@ class DelugeClient(object):
|
||||||
|
|
||||||
for module, methods in methodmap.items():
|
for module, methods in methodmap.items():
|
||||||
clsname = 'DelugeModule{0}'.format(module.capitalize())
|
clsname = 'DelugeModule{0}'.format(module.capitalize())
|
||||||
cls = type(clsname, (), methods)
|
cls = type(str(clsname), (), methods)
|
||||||
setattr(self, module, cls())
|
setattr(self, str(module), cls())
|
||||||
self.modules.append(module)
|
self.modules.append(module)
|
||||||
|
|
||||||
def remote_call(self, method, *args, **kwargs):
|
def remote_call(self, method, *args, **kwargs):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue