mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-03-12 12:35:28 -07:00
fix to make deluge client py 2 and 3 compatible. Fixes #1626
This commit is contained in:
parent
81895afd3f
commit
d39a7dd234
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user