diff sat/plugins/plugin_misc_merge_requests.py @ 3586:5f65f4e9f8cb

plugin XEP-0060: getItems extra is now serialised dict
author Goffi <goffi@goffi.org>
date Wed, 28 Jul 2021 23:01:15 +0200
parents be6d91572633
children a0666f17f300
line wrap: on
line diff
--- a/sat/plugins/plugin_misc_merge_requests.py	Wed Jul 28 22:15:31 2021 +0200
+++ b/sat/plugins/plugin_misc_merge_requests.py	Wed Jul 28 23:01:15 2021 +0200
@@ -77,7 +77,7 @@
         self._handlers_list = []  # handlers sorted by priority
         self._type_handlers = {}  # data type => handler map
         host.bridge.addMethod("mergeRequestsGet", ".plugin",
-                              in_sign='ssiassa{ss}s', out_sign='s',
+                              in_sign='ssiassss', out_sign='s',
                               method=self._get,
                               async_=True
                               )
@@ -149,11 +149,10 @@
         })
 
     def _get(self, service='', node='', max_items=10, item_ids=None, sub_id=None,
-             extra_dict=None, profile_key=C.PROF_KEY_NONE):
-        if extra_dict and 'parse' in extra_dict:
-                extra_dict['parse'] = C.bool(extra_dict['parse'])
+             extra="", profile_key=C.PROF_KEY_NONE):
+        extra = data_format.deserialise(extra)
         client, service, node, max_items, extra, sub_id = self._s.prepareBridgeGet(
-            service, node, max_items, sub_id, extra_dict, profile_key)
+            service, node, max_items, sub_id, extra, profile_key)
         d = self.get(client, service, node or None, max_items, item_ids, sub_id or None,
                      extra.rsm_request, extra.extra)
         d.addCallback(self.serialise)