plugin XEP-0060: getItems extra is now serialised dict
This commit is contained in:
parent
fcbbc2aeed
commit
f2a06bbcbf
1 changed files with 32 additions and 31 deletions
|
|
@ -41,6 +41,7 @@ from sat.tools.common import dynamic_import
|
|||
from sat.tools.common import uri
|
||||
from sat.tools.common import date_utils
|
||||
from sat.tools.common import utils
|
||||
from sat.tools.common import data_format
|
||||
from sat.tools.common.ansi import ANSI as A
|
||||
from sat.core import exceptions
|
||||
import sat_frontends.jp
|
||||
|
|
@ -1189,11 +1190,11 @@ class CommandBase(object):
|
|||
_('trying to use output when use_output has not been set'))
|
||||
return self.host.output(output_type, self.args.output, self.extra_outputs, data)
|
||||
|
||||
def getPubsubExtra(self, extra=None):
|
||||
def getPubsubExtra(self, extra: Optional[dict] = None) -> str:
|
||||
"""Helper method to compute extra data from pubsub arguments
|
||||
|
||||
@param extra(None, dict): base extra dict, or None to generate a new one
|
||||
@return (dict): dict which can be used directly in the bridge for pubsub
|
||||
@param extra: base extra dict, or None to generate a new one
|
||||
@return: dict which can be used directly in the bridge for pubsub
|
||||
"""
|
||||
if extra is None:
|
||||
extra = {}
|
||||
|
|
@ -1234,7 +1235,7 @@ class CommandBase(object):
|
|||
else:
|
||||
if order_by is not None:
|
||||
extra[C.KEY_ORDER_BY] = self.args.order_by
|
||||
return extra
|
||||
return data_format.serialise(extra)
|
||||
|
||||
def add_parser_options(self):
|
||||
try:
|
||||
|
|
|
|||
Loading…
Reference in a new issue