Mercurial > libervia-backend
comparison sat_frontends/jp/base.py @ 2615:b4ecbcc2fd08
tools (misc): do not remove flags while using them anymore, instead added "all_used" and "unused" properties in FlagsHandler
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 21 Jun 2018 01:21:44 +0200 |
parents | a5b96950b81a |
children | 0fa217fafabf |
comparison
equal
deleted
inserted
replaced
2614:a5b96950b81a | 2615:b4ecbcc2fd08 |
---|---|
367 pubsub_group.add_argument("-i", "--item", type=unicode_decoder, action='append', dest='items', default=[], help=_(u"items to retrieve (DEFAULT: all)")) | 367 pubsub_group.add_argument("-i", "--item", type=unicode_decoder, action='append', dest='items', default=[], help=_(u"items to retrieve (DEFAULT: all)")) |
368 if not flags.no_max: | 368 if not flags.no_max: |
369 pubsub_group.add_argument("-m", "--max", type=int, default=10, | 369 pubsub_group.add_argument("-m", "--max", type=int, default=10, |
370 help=_(u"maximum number of items to get ({no_limit} to get all items)".format(no_limit=C.NO_LIMIT))) | 370 help=_(u"maximum number of items to get ({no_limit} to get all items)".format(no_limit=C.NO_LIMIT))) |
371 | 371 |
372 if flags: | 372 if not flags.all_used: |
373 raise exceptions.InternalError('unknowns flags: {flags}'.format(flags=u', '.join(flags))) | 373 raise exceptions.InternalError('unknown flags: {flags}'.format(flags=u', '.join(flags.unused))) |
374 if defaults: | 374 if defaults: |
375 raise exceptions.InternalError('unused defaults: {defaults}'.format(defaults=defaults)) | 375 raise exceptions.InternalError('unused defaults: {defaults}'.format(defaults=defaults)) |
376 | 376 |
377 return parent | 377 return parent |
378 | 378 |