Mercurial > libervia-backend
diff 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 |
line wrap: on
line diff
--- a/sat_frontends/jp/base.py Thu Jun 21 01:21:44 2018 +0200 +++ b/sat_frontends/jp/base.py Thu Jun 21 01:21:44 2018 +0200 @@ -369,8 +369,8 @@ pubsub_group.add_argument("-m", "--max", type=int, default=10, help=_(u"maximum number of items to get ({no_limit} to get all items)".format(no_limit=C.NO_LIMIT))) - if flags: - raise exceptions.InternalError('unknowns flags: {flags}'.format(flags=u', '.join(flags))) + if not flags.all_used: + raise exceptions.InternalError('unknown flags: {flags}'.format(flags=u', '.join(flags.unused))) if defaults: raise exceptions.InternalError('unused defaults: {defaults}'.format(defaults=defaults))