Mercurial > libervia-backend
comparison sat_frontends/jp/base.py @ 2706:bad70aa70c87
jp (base): pubsub legacy --max option renamed to --max-item to prepare the use of --max for RSM.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 01 Dec 2018 10:47:59 +0100 |
parents | 0bb811aaf11d |
children | 4b693ea24d5f |
comparison
equal
deleted
inserted
replaced
2705:0bb811aaf11d | 2706:bad70aa70c87 |
---|---|
371 pubsub_group.add_argument("-L", "--last-item", action='store_true', help=_(u'retrieve last item')) | 371 pubsub_group.add_argument("-L", "--last-item", action='store_true', help=_(u'retrieve last item')) |
372 elif flags.multi_items: | 372 elif flags.multi_items: |
373 # mutiple items | 373 # mutiple items |
374 pubsub_group.add_argument("-i", "--item", type=unicode_decoder, action='append', dest='items', default=[], help=_(u"items to retrieve (DEFAULT: all)")) | 374 pubsub_group.add_argument("-i", "--item", type=unicode_decoder, action='append', dest='items', default=[], help=_(u"items to retrieve (DEFAULT: all)")) |
375 if not flags.no_max: | 375 if not flags.no_max: |
376 pubsub_group.add_argument("-m", "--max", type=int, default=10, | 376 pubsub_group.add_argument("-m", "--max-items", dest="max", type=int, default=10, |
377 help=_(u"maximum number of items to get ({no_limit} to get all items)".format(no_limit=C.NO_LIMIT))) | 377 help=_(u"maximum number of items to get ({no_limit} to get all items)".format(no_limit=C.NO_LIMIT))) |
378 | 378 |
379 if not flags.all_used: | 379 if not flags.all_used: |
380 raise exceptions.InternalError('unknown flags: {flags}'.format(flags=u', '.join(flags.unused))) | 380 raise exceptions.InternalError('unknown flags: {flags}'.format(flags=u', '.join(flags.unused))) |
381 if defaults: | 381 if defaults: |