plugins tickets, merge-requests: ticketsGet and mergeRequestsGet serialisation:
those methods now return data serialised with `data_format.serialise`
This commit is contained in:
parent
e03eb5bfcc
commit
95096df52f
1 changed files with 71 additions and 57 deletions
|
|
@ -18,12 +18,13 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
from . import base
|
||||
from sat.core.i18n import _
|
||||
from sat_frontends.jp import common
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
import json
|
||||
import os
|
||||
from sat.core.i18n import _
|
||||
from sat.tools.common import data_format
|
||||
from sat_frontends.jp import common
|
||||
from sat_frontends.jp.constants import Const as C
|
||||
from . import base
|
||||
|
||||
__commands__ = ["Ticket"]
|
||||
|
||||
|
|
@ -50,14 +51,17 @@ class Get(base.CommandBase):
|
|||
async def start(self):
|
||||
await common.fill_well_known_uri(self, os.getcwd(), "tickets", meta_map={})
|
||||
try:
|
||||
tickets_data = await self.host.bridge.ticketsGet(
|
||||
self.args.service,
|
||||
self.args.node,
|
||||
self.args.max,
|
||||
self.args.items,
|
||||
"",
|
||||
self.getPubsubExtra(),
|
||||
self.profile,
|
||||
tickets_data = data_format.deserialise(
|
||||
await self.host.bridge.ticketsGet(
|
||||
self.args.service,
|
||||
self.args.node,
|
||||
self.args.max,
|
||||
self.args.items,
|
||||
"",
|
||||
self.getPubsubExtra(),
|
||||
self.profile,
|
||||
),
|
||||
type_check=list
|
||||
)
|
||||
except Exception as e:
|
||||
self.disp(f"can't get tickets: {e}", error=True)
|
||||
|
|
|
|||
Loading…
Reference in a new issue