Mercurial > libervia-backend
diff sat_frontends/jp/base.py @ 2910:b2f323237fce
jp, plugin merge-requests: used u'' as default for item id in pubsub arguments + fixed some required arguments:
u"" is now used as defaut item id instead of node, as it needs to be serialised anyway. This is temporary solution, as empty string can be used for item id (not forbidden by XEP-0060), but for now this is not handled correctly in jp/SàT (see https://bugs.goffi.org/bugs/view/289). Correct solution will probably need to use a special key in extra to mark empty string in id.
Added/removed some required values for node or item when it made sense.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 14 Apr 2019 08:21:51 +0200 |
parents | 2dfd5b1d39df |
children | ab2696e34d29 |
line wrap: on
line diff
--- a/sat_frontends/jp/base.py Sun Apr 14 08:21:51 2019 +0200 +++ b/sat_frontends/jp/base.py Sun Apr 14 08:21:51 2019 +0200 @@ -367,7 +367,8 @@ default = defaults.pop(u'item', _(u'last item')) if default is not None: item_help += _(u" (DEFAULT: {default})".format(default=default)) - pubsub_group.add_argument("-i", "--item", type=unicode_decoder, help=item_help) + pubsub_group.add_argument("-i", "--item", type=unicode_decoder, default=u'', + help=item_help) pubsub_group.add_argument("-L", "--last-item", action='store_true', help=_(u'retrieve last item')) elif flags.multi_items: # mutiple items, this activate several features: max-items, RSM, MAM