bh: utils/testing create_ldap_users.py,1.6,1.7

cvs at kolab.org cvs at kolab.org
Mon May 18 19:23:40 CEST 2009


Author: bh

Update of /kolabrepository/utils/testing
In directory doto:/tmp/cvs-serv6411/testing

Modified Files:
	create_ldap_users.py 
Log Message:
Fix some problems with command line argument handling:

  --offset wasn't accepted by getopt even though the later code would
  have recognizedit

  the check for --member accidentally used substring matching


Index: create_ldap_users.py
===================================================================
RCS file: /kolabrepository/utils/testing/create_ldap_users.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- create_ldap_users.py	18 May 2009 17:21:11 -0000	1.6
+++ create_ldap_users.py	18 May 2009 17:23:38 -0000	1.7
@@ -138,7 +138,7 @@
     offset = 0
 
     opts, args = getopt.getopt(sys.argv[1:], 'h:p:u:n:o:t:',
-                               ["host=", "port=", "user=", "num=",
+                               ["host=", "port=", "user=", "num=", "offset=",
                                 "type=", "member="])
     for optchar, value in opts:
         if optchar in ("-h", "--host"):
@@ -151,7 +151,7 @@
             offset = int(value)
         elif optchar in ("-t", "--type"):
             entry_type = value
-        elif optchar in "--member":
+        elif optchar == "--member":
             # dn of the initial member.  groups may not be empty in Kolab
             group_member = value
         elif optchar in ("-n", "--num"):





More information about the commits mailing list