`get_all_plugins` should use `Message.Encoder` for encoding the response.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
Some plugin information may include enums, tuples and other types that aren't serializable by the default JSON serializer.
This commit is contained in:
parent
fa2b84a269
commit
2e004c1a1e
|
@ -12,6 +12,7 @@ from typing import Callable, Dict, Generator, Optional, Type, Union
|
||||||
from platypush.backend import Backend
|
from platypush.backend import Backend
|
||||||
from platypush.config import Config
|
from platypush.config import Config
|
||||||
from platypush.plugins import Plugin, action
|
from platypush.plugins import Plugin, action
|
||||||
|
from platypush.message import Message
|
||||||
from platypush.message.event import Event
|
from platypush.message.event import Event
|
||||||
from platypush.message.response import Response
|
from platypush.message.response import Response
|
||||||
from platypush.utils import (
|
from platypush.utils import (
|
||||||
|
@ -314,7 +315,8 @@ class InspectPlugin(Plugin):
|
||||||
{
|
{
|
||||||
get_plugin_name_by_class(cls): dict(plugin)
|
get_plugin_name_by_class(cls): dict(plugin)
|
||||||
for cls, plugin in self._components_cache.get(Plugin, {}).items()
|
for cls, plugin in self._components_cache.get(Plugin, {}).items()
|
||||||
}
|
},
|
||||||
|
cls=Message.Encoder,
|
||||||
)
|
)
|
||||||
|
|
||||||
@action
|
@action
|
||||||
|
|
Loading…
Reference in New Issue