Update server.py

This commit is contained in:
Namhyeon Go 2024-03-06 15:22:32 +09:00 committed by GitHub
parent acab9b3d5a
commit 259a1674e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -490,7 +490,7 @@ class Extension():
@classmethod
def get_rpcmethod(cls, method):
for extension in cls.extensions:
if extension.type == "rpcmethod" and (method in extension.methods):
if extension.type == "rpcmethod" and ( (method == extension.method) or (method in extension.methods) ):
return extension
return None
@ -524,13 +524,14 @@ class Extension():
def __init__(self):
self.type = None
self.method = None
self.methods = []
self.connection_type = None
def test(self, filtered, data, webserver, port, scheme, method, url):
raise NotImplementedError
def dispatch(self, type, id, params, method, conn = None):
def dispatch(self, type, id, params, conn = None, method = None):
raise NotImplementedError
def connect(self, conn, data, webserver, port, scheme, method, url):