From a53bc0a91bea89f0f284429c8fe2678891dd239b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Matthias=20Dieter=20Walln=C3=B6fer?= Date: Mon, 7 Nov 2011 17:57:52 +0100 Subject: [PATCH] =?utf8?q?s4:samba-tool=20-=20other=20fix=20for=20G=C3=A9m?= =?utf8?q?es=20G=C3=A9za=20patch=20regarding=20parameter=20handling?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The condition has not been specified correctly since we are expecting a boolean. Pointed out by Jelmer. Reviewed-by: Jelmer --- source4/scripting/python/samba/netcmd/user.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source4/scripting/python/samba/netcmd/user.py b/source4/scripting/python/samba/netcmd/user.py index 0ac4b237422..e45b3bfb75e 100644 --- a/source4/scripting/python/samba/netcmd/user.py +++ b/source4/scripting/python/samba/netcmd/user.py @@ -106,7 +106,7 @@ Example3 shows how to create a new user in the OrgUnit organizational unit. job_title=None, department=None, company=None, description=None, mail_address=None, internet_address=None, telephone_number=None, physical_delivery_office=None): - if random_password is True: + if random_password: password = generate_random_password(128, 255) while 1: @@ -401,7 +401,7 @@ Example3 shows how an administrator would reset TestUser3 user's password to pas if filter is None and username is None: raise CommandError("Either the username or '--filter' must be specified!") - if random_password is True: + if random_password: password = generate_random_password(128, 255) else: password = newpassword -- 2.34.1