From: Rob van der Linde Date: Tue, 31 Oct 2023 22:55:01 +0000 (+1300) Subject: netcmd: user: PEP8 E303 E305: fix too many or too little blank lines X-Git-Tag: talloc-2.4.2~760 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=925ec0e6c8cacef7a1f673d8d8786316c68aff12;p=thirdparty%2Fsamba.git netcmd: user: PEP8 E303 E305: fix too many or too little blank lines Signed-off-by: Rob van der Linde Reviewed-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/netcmd/user/edit.py b/python/samba/netcmd/user/edit.py index c6d445ac0d5..4a850f491c1 100644 --- a/python/samba/netcmd/user/edit.py +++ b/python/samba/netcmd/user/edit.py @@ -120,7 +120,6 @@ LDAP server using the 'nano' editor. with open(t_file.name) as edited_file: edited_message = edited_file.read() - msgs_edited = samdb.parse_ldif(edited_message) msg_edited = next(msgs_edited)[1] diff --git a/python/samba/netcmd/user/readpasswords/common.py b/python/samba/netcmd/user/readpasswords/common.py index 1f847a3f300..f9406844a3d 100644 --- a/python/samba/netcmd/user/readpasswords/common.py +++ b/python/samba/netcmd/user/readpasswords/common.py @@ -131,6 +131,7 @@ def get_crypt_value(alg, utf8pw, rounds=0): crypt_salt, len(crypt_value), expected_len)) return crypt_value + try: import hashlib hashlib.sha1() @@ -451,7 +452,6 @@ class GetPasswordCommand(Command): "into CLEARTEXT: %s\n" % ( username or account_name, e)) - def get_utf8(a, b, username): try: u = str(get_bytes(b), 'utf-16-le')