From: Rob van der Linde Date: Wed, 1 Mar 2023 01:19:15 +0000 (+1300) Subject: netcmd: simplify boolean check X-Git-Tag: talloc-2.4.1~1174 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01c6bc55c7ea285608a4056782afb415ed5a66ed;p=thirdparty%2Fsamba.git netcmd: simplify boolean check Should use "is" for checking booleans rather than "==" in Python, however these can also be simplified. Signed-off-by: Rob van der Linde Reviewed-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/netcmd/domain/classicupgrade.py b/python/samba/netcmd/domain/classicupgrade.py index 2ca4935d88d..4a8b90b5f29 100644 --- a/python/samba/netcmd/domain/classicupgrade.py +++ b/python/samba/netcmd/domain/classicupgrade.py @@ -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"):