s4:samba-tool - other fix for Gémes Géza patch regarding parameter handling
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Mon, 7 Nov 2011 16:57:52 +0000 (17:57 +0100)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Tue, 8 Nov 2011 19:53:08 +0000 (20:53 +0100)
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

index 0ac4b23742201497b0a7a79a94b3f4cc04144408..e45b3bfb75ec8d2a377badcafee8e122a13fe101 100644 (file)
@@ -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