]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
netcmd: user: PEP8 E127: fix hanging indent not lining up
authorRob van der Linde <rob@catalyst.net.nz>
Tue, 31 Oct 2023 22:39:54 +0000 (11:39 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 15 Nov 2023 04:05:34 +0000 (04:05 +0000)
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/user/add_unix_attrs.py
python/samba/netcmd/user/readpasswords/common.py
python/samba/netcmd/user/rename.py

index 693b541217cd8ac6d296581f10a56da16cc68b5a..d0687e927134c37884ead1f3b9a98f3f28d26ff6 100644 (file)
@@ -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,
index 5b2770ac1d9d45dc99aa3b8286d6da2bd6da5e90..eea96c9139e0a61347990aceca51ee83c2700114 100644 (file)
@@ -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)
index 75e422e2411f013806e682648557f07233c0eba1..81d5de31175f7f87199f782c033cf4e758d0f82f 100644 (file)
@@ -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)