mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-22 08:50:09 +00:00
Rename __json__() to asdict()
This commit is contained in:
@ -71,8 +71,8 @@ class NotificationQueue(asyncio.Queue):
|
||||
Get a message as a JSON
|
||||
"""
|
||||
(action, msg, kwargs) = await self.get(timeout)
|
||||
if hasattr(msg, "__json__"):
|
||||
msg = {"action": action, "event": msg.__json__()}
|
||||
if hasattr(msg, "asdict"):
|
||||
msg = {"action": action, "event": msg.asdict()}
|
||||
else:
|
||||
msg = {"action": action, "event": msg}
|
||||
msg.update(kwargs)
|
||||
|
Reference in New Issue
Block a user