diff options
author | Joe Guo <joeg@catalyst.net.nz> | 2018-10-29 12:12:38 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2018-11-21 07:46:19 +0100 |
commit | e71d0d71203474b1b30c8c8250c28ba4889b1f20 (patch) | |
tree | b4ca212a215ff0ba1af931a3a6af8b65535c9ccf /python | |
parent | 263f02078471a29cad97889a28c02db4ea06a422 (diff) | |
download | samba-e71d0d71203474b1b30c8c8250c28ba4889b1f20.tar.gz |
netcmd/ldapcmp: add choices arg to --view option
So we don't need to validate ourselves.
Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python')
-rw-r--r-- | python/samba/netcmd/ldapcmp.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/python/samba/netcmd/ldapcmp.py b/python/samba/netcmd/ldapcmp.py index 01739f90f85..9bfa8531e81 100644 --- a/python/samba/netcmd/ldapcmp.py +++ b/python/samba/netcmd/ldapcmp.py @@ -905,7 +905,7 @@ class cmd_ldapcmp(Command): help="Compare nTSecurityDescriptor attibutes only"), Option("--sort-aces", dest="sort_aces", action="store_true", default=False, help="Sort ACEs before comparison of nTSecurityDescriptor attribute"), - Option("--view", dest="view", default="section", + Option("--view", dest="view", default="section", choices=["section", "collision"], help="Display mode for nTSecurityDescriptor results. Possible values: section or collision."), Option("--base", dest="base", default="", help="Pass search base that will build DN list for the first DC."), @@ -964,8 +964,6 @@ class cmd_ldapcmp(Command): raise CommandError("You cannot set --verbose and --quiet together") if (not base and base2) or (base and not base2): raise CommandError("You need to specify both --base and --base2 at the same time") - if descriptor and view.upper() not in ["SECTION", "COLLISION"]: - raise CommandError("Invalid --view value. Choose from: section or collision") con1 = LDAPBase(URL1, creds, lp, two=two, quiet=quiet, descriptor=descriptor, sort_aces=sort_aces, |