From 4bd0806e58c139f2fcd0f12afb0cfe929f77bc01 Mon Sep 17 00:00:00 2001 From: hackrush Date: Thu, 19 Jul 2018 00:43:42 +0530 Subject: [PATCH] Fix metaclass not registering objects --- lbrynet/daemon/Component.py | 3 +-- lbrynet/daemon/auth/server.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lbrynet/daemon/Component.py b/lbrynet/daemon/Component.py index ccc1c00d7..051189f40 100644 --- a/lbrynet/daemon/Component.py +++ b/lbrynet/daemon/Component.py @@ -14,7 +14,7 @@ class ComponentType(type): return klass -class Component(object): +class Component(object, metaclass=ComponentType): """ lbrynet-daemon component helper @@ -22,7 +22,6 @@ class Component(object): methods """ - __metaclass__ = ComponentType depends_on = [] component_name = None diff --git a/lbrynet/daemon/auth/server.py b/lbrynet/daemon/auth/server.py index b7c1cbd2d..74766e262 100644 --- a/lbrynet/daemon/auth/server.py +++ b/lbrynet/daemon/auth/server.py @@ -129,8 +129,7 @@ class JSONRPCServerType(type): return klass -class AuthorizedBase(object): - __metaclass__ = JSONRPCServerType +class AuthorizedBase(object, metaclass=JSONRPCServerType): @staticmethod def deprecated(new_command=None):