Fix metaclass not registering objects

This commit is contained in:
hackrush 2018-07-19 00:43:42 +05:30 committed by Jack Robison
parent 4cbb71705e
commit 4bd0806e58
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2
2 changed files with 2 additions and 4 deletions

View file

@ -14,7 +14,7 @@ class ComponentType(type):
return klass return klass
class Component(object): class Component(object, metaclass=ComponentType):
""" """
lbrynet-daemon component helper lbrynet-daemon component helper
@ -22,7 +22,6 @@ class Component(object):
methods methods
""" """
__metaclass__ = ComponentType
depends_on = [] depends_on = []
component_name = None component_name = None

View file

@ -129,8 +129,7 @@ class JSONRPCServerType(type):
return klass return klass
class AuthorizedBase(object): class AuthorizedBase(object, metaclass=JSONRPCServerType):
__metaclass__ = JSONRPCServerType
@staticmethod @staticmethod
def deprecated(new_command=None): def deprecated(new_command=None):