]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
samba-tool domain: Clean up code
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Mon, 13 Feb 2023 01:53:42 +0000 (14:53 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 18 May 2023 01:03:37 +0000 (01:03 +0000)
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/functional_level.py
python/samba/netcmd/domain/provision.py

index 4c1142273b03060570790b03008fa5ef22c13614..3746516b49bf9032aea5745d60c8a9d666942a64 100644 (file)
@@ -50,7 +50,7 @@ def level_to_string(level):
         return "invalid"
     strings = {
         DS_DOMAIN_FUNCTION_2000: "2000",
-        DS_DOMAIN_FUNCTION_2003_MIXED: \
+        DS_DOMAIN_FUNCTION_2003_MIXED:
             "2003 with mixed domains/interim (NT4 DC support)",
         DS_DOMAIN_FUNCTION_2003: "2003",
         DS_DOMAIN_FUNCTION_2008: "2008",
index bd9cb92b385003f820b7c73ca1f766ee33bbdf81..aa87accd13eb7e217ee251f6c47611854f1f0286 100644 (file)
@@ -307,9 +307,9 @@ class cmd_domain_provision(Command):
 
         if use_xattrs == "yes":
             eadb = False
-        elif use_xattrs == "auto" and use_ntvfs == False:
+        elif use_xattrs == "auto" and not use_ntvfs:
             eadb = False
-        elif use_ntvfs == False:
+        elif not use_ntvfs:
             raise CommandError("--use-xattrs=no requires --use-ntvfs (not supported for production use).  "
                                "Please re-run with --use-xattrs omitted.")
         elif use_xattrs == "auto" and not lp.get("posix:eadb"):