Session.call takes in kwargs instead of args
This commit is contained in:
parent
e9f40dbed9
commit
97c3aba3ec
|
@ -104,10 +104,10 @@ class Session():
|
||||||
def __del__(self): # handleLogoutRequest
|
def __del__(self): # handleLogoutRequest
|
||||||
self.logout()
|
self.logout()
|
||||||
|
|
||||||
def call(self, method, args = ()):
|
def call(self, method, **kwargs):
|
||||||
args = [str(s) for s in args]
|
self.logger.debug("%s(%s)", method,
|
||||||
self.logger.debug("%s(%s)", method, ", ".join(args))
|
", ".join(str(k) + ': ' + str(v) for k, v in kwargs.items()))
|
||||||
self.stack.broadcastEvent(YowLayerEvent(method, **args))
|
self.stack.broadcastEvent(YowLayerEvent(method, **kwargs))
|
||||||
|
|
||||||
def logout(self):
|
def logout(self):
|
||||||
self.stack.broadcastEvent(YowLayerEvent(YowNetworkLayer.EVENT_STATE_DISCONNECT))
|
self.stack.broadcastEvent(YowLayerEvent(YowNetworkLayer.EVENT_STATE_DISCONNECT))
|
||||||
|
|
Loading…
Reference in a new issue