From: Rob van der Linde Date: Tue, 31 Oct 2023 22:39:54 +0000 (+1300) Subject: netcmd: user: PEP8 E127: fix hanging indent not lining up X-Git-Tag: talloc-2.4.2~763 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b0cb65363946bbd2598bd55f5089085f2150661;p=thirdparty%2Fsamba.git netcmd: user: PEP8 E127: fix hanging indent not lining up Signed-off-by: Rob van der Linde Reviewed-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/netcmd/user/add_unix_attrs.py b/python/samba/netcmd/user/add_unix_attrs.py index 693b541217c..d0687e92713 100644 --- a/python/samba/netcmd/user/add_unix_attrs.py +++ b/python/samba/netcmd/user/add_unix_attrs.py @@ -186,7 +186,7 @@ The users gecos field will be set to 'User4 test' if gid_number is None: search_filter = ("(samaccountname={})" - .format(ldb.binary_encode('Domain Users'))) + .format(ldb.binary_encode('Domain Users'))) try: res = samdb.search(domaindn, scope=ldb.SCOPE_SUBTREE, diff --git a/python/samba/netcmd/user/readpasswords/common.py b/python/samba/netcmd/user/readpasswords/common.py index 5b2770ac1d9..eea96c9139e 100644 --- a/python/samba/netcmd/user/readpasswords/common.py +++ b/python/samba/netcmd/user/readpasswords/common.py @@ -628,7 +628,7 @@ class GetPasswordCommand(Command): h_value = get_string(h.value) if (scheme_match is None and h.scheme == SCHEME and - h_value.startswith(scheme_prefix)): + h_value.startswith(scheme_prefix)): scheme_match = h_value if h.scheme == SCHEME and h_value.startswith(prefix): return (h_value, scheme_match) diff --git a/python/samba/netcmd/user/rename.py b/python/samba/netcmd/user/rename.py index 75e422e2411..81d5de31175 100644 --- a/python/samba/netcmd/user/rename.py +++ b/python/samba/netcmd/user/rename.py @@ -154,7 +154,7 @@ class cmd_user_rename(Command): # use the sAMAccountname as CN if no name is given new_fallback_cn = samaccountname if samaccountname is not None \ - else old_user["sAMAccountName"] + else old_user["sAMAccountName"] if force_new_cn is not None: new_user_cn = force_new_cn @@ -168,10 +168,10 @@ class cmd_user_rename(Command): # CN must change, if the new CN is different and the old CN is the # standard CN or the change is forced with force-new-cn or reset-cn expected_cn = samdb.fullname_from_names(old_attrs=old_user, - fallback_default=old_user["sAMAccountName"]) - must_change_cn = str(old_cn) != str(new_user_cn) and \ - (str(old_cn) == str(expected_cn) or - reset_cn or bool(force_new_cn)) + fallback_default=old_user["sAMAccountName"]) + must_change_cn = str(old_cn) != str(new_user_cn) and ( + str(old_cn) == str(expected_cn) or + reset_cn or bool(force_new_cn)) new_user_dn = ldb.Dn(samdb, "CN=%s" % new_user_cn) new_user_dn.add_base(user_parent_dn)