PR#2207: cli: improve grant-permission --new --help message

Merges #2207
https://pagure.io/koji/pull-request/2207
This commit is contained in:
Tomas Kopecek 2020-04-29 10:13:51 +02:00
commit f4b05ab953
2 changed files with 3 additions and 2 deletions

View file

@ -2245,7 +2245,8 @@ def handle_grant_permission(goptions, session, args):
"[admin] Grant a permission to a user"
usage = _("usage: %prog grant-permission [--new] <permission> <user> [<user> ...]")
parser = OptionParser(usage=get_usage_str(usage))
parser.add_option("--new", action="store_true", help=_("Create a new permission"))
parser.add_option("--new", action="store_true",
help=_("Create this permission if the permission does not exist"))
(options, args) = parser.parse_args(args)
if len(args) < 2:
parser.error(_("Please specify a permission and at least one user"))

View file

@ -77,7 +77,7 @@ class TestGrantPermission(utils.CliTestCase):
Options:
-h, --help show this help message and exit
--new Create a new permission
--new Create this permission if the permission does not exist
""" % self.progname)