]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
netcmd: user: PEP8 E117: code is overindented
authorRob van der Linde <rob@catalyst.net.nz>
Tue, 31 Oct 2023 22:28:34 +0000 (11:28 +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.py
python/samba/netcmd/user/readpasswords/common.py

index 16cd3feda2b8fe04e1d017aba90f19c1958616cf..be4e3cc811035d718e76de84cb3d53910065134f 100644 (file)
@@ -163,17 +163,17 @@ Example5 shows how to add a new RFC2307/NIS domain enabled user account. If
                 self.outf.write("Sorry, passwords do not match.\n")
 
         if rfc2307_from_nss:
-                pwent = pwd.getpwnam(username)
-                if uid is None:
-                    uid = username
-                if uid_number is None:
-                    uid_number = pwent[2]
-                if gid_number is None:
-                    gid_number = pwent[3]
-                if gecos is None:
-                    gecos = pwent[4]
-                if login_shell is None:
-                    login_shell = pwent[6]
+            pwent = pwd.getpwnam(username)
+            if uid is None:
+                uid = username
+            if uid_number is None:
+                uid_number = pwent[2]
+            if gid_number is None:
+                gid_number = pwent[3]
+            if gecos is None:
+                gecos = pwent[4]
+            if login_shell is None:
+                login_shell = pwent[6]
 
         lp = sambaopts.get_loadparm()
         creds = credopts.get_credentials(lp)
index ba81cc2d311b4cf00b65cd9bb096a77cb9ea05a7..5b2770ac1d9d45dc99aa3b8286d6da2bd6da5e90 100644 (file)
@@ -250,9 +250,9 @@ class GetPasswordCommand(Command):
             return None
 
         formats = [
-                "GeneralizedTime",
-                "UnixTime",
-                "TimeSpec",
+            "GeneralizedTime",
+            "UnixTime",
+            "TimeSpec",
         ]
 
         def get_virtual_format_definition(opts):