WSRoot.addprotocol now takes keywords parameters and transmit them to getprotocol for instanciating the protocol
This commit is contained in:
@@ -225,7 +225,7 @@ class WSRoot(object):
|
|||||||
|
|
||||||
self._api = None
|
self._api = None
|
||||||
|
|
||||||
def addprotocol(self, protocol):
|
def addprotocol(self, protocol, **options):
|
||||||
"""
|
"""
|
||||||
Enable a new protocol on the controller.
|
Enable a new protocol on the controller.
|
||||||
|
|
||||||
@@ -233,7 +233,7 @@ class WSRoot(object):
|
|||||||
of a protocol.
|
of a protocol.
|
||||||
"""
|
"""
|
||||||
if isinstance(protocol, str):
|
if isinstance(protocol, str):
|
||||||
protocol = getprotocol(protocol)
|
protocol = getprotocol(protocol, options)
|
||||||
self.protocols[protocol.name] = protocol
|
self.protocols[protocol.name] = protocol
|
||||||
protocol.root = weakref.proxy(self)
|
protocol.root = weakref.proxy(self)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user