]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
netcmd: simplify boolean check
authorRob van der Linde <rob@catalyst.net.nz>
Wed, 1 Mar 2023 01:19:15 +0000 (14:19 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 31 Mar 2023 07:25:32 +0000 (07:25 +0000)
Should use "is" for checking booleans rather than "==" in Python, however these can also be simplified.

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/netcmd/domain/classicupgrade.py

index 2ca4935d88d1e2f2c89ef0d5d2be1541d6133f84..4a8b90b5f2909272d6fc1e0cf3b508d15d0d5713 100644 (file)
@@ -134,9 +134,9 @@ class cmd_domain_classicupgrade(Command):
         eadb = True
         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 s3conf.get("posix:eadb"):