[Core] Replace usage of deprecated new.classobj

* type is new module to use
This commit is contained in:
Calum Lind 2017-06-05 09:02:51 +01:00
parent 66718f6d8e
commit ede0f710f8
2 changed files with 2 additions and 4 deletions

View File

@ -9,8 +9,6 @@
from __future__ import unicode_literals
from new import classobj
from deluge.core.core import Core
from deluge.core.daemon import Daemon
@ -27,7 +25,7 @@ def scan_for_methods(obj):
if not hasattr(getattr(obj, d), '_rpcserver_export'):
continue
methods[d] = getattr(obj, d)
cobj = classobj(obj.__name__.lower(), (object,), methods)
cobj = type(obj.__name__.lower(), (object,), methods)
setattr(RpcApi, obj.__name__.lower(), cobj)

View File

@ -92,7 +92,7 @@ commands = {[testenv:pydef]commands}
###########################
[testenv:flake8]
# Disble site packages to avoid using system flake8 which uses hardcoded python path which imports the wrong libraries.
# Disable site packages to avoid using system flake8 which uses hardcoded python path which imports the wrong libraries.
sitepackages = False
deps =
{[testenv]deps}