[Checkins] SVN: cipher.googlepam/trunk/ add-google-users: --add-to-group-command for completeness

Marius Gedminas cvs-admin at zope.org
Tue Oct 9 08:37:22 UTC 2012


Log message for revision 127949:
  add-google-users: --add-to-group-command for completeness

Changed:
  U   cipher.googlepam/trunk/CHANGES.txt
  U   cipher.googlepam/trunk/src/cipher/googlepam/addusers.py

-=-
Modified: cipher.googlepam/trunk/CHANGES.txt
===================================================================
--- cipher.googlepam/trunk/CHANGES.txt	2012-10-09 08:37:14 UTC (rev 127948)
+++ cipher.googlepam/trunk/CHANGES.txt	2012-10-09 08:37:19 UTC (rev 127949)
@@ -14,7 +14,9 @@
 - Added add-google-users option --add-to-group as a more meaningful alias for
   the old --admin-group option.
 
+- Added add-google-users option --add-to-group-command for completeness.
 
+
 1.4.0 (2012-10-08)
 ------------------
 

Modified: cipher.googlepam/trunk/src/cipher/googlepam/addusers.py
===================================================================
--- cipher.googlepam/trunk/src/cipher/googlepam/addusers.py	2012-10-09 08:37:14 UTC (rev 127948)
+++ cipher.googlepam/trunk/src/cipher/googlepam/addusers.py	2012-10-09 08:37:19 UTC (rev 127949)
@@ -112,7 +112,7 @@
             if err.args[0] != 1:
                 raise
         if options.admin_group:
-            do(ADDADMIN_CMD % user, dry_run=options.dry_run)
+            do(options.group_command % user, dry_run=options.dry_run)
 
 parser.add_option(
     '-C', '--config-file', action='store',
@@ -152,6 +152,11 @@
     help='The command used to create the user (default: %default).')
 
 parser.add_option(
+    '--add-to-group-command', metavar='COMMAND', action='store',
+    dest='group_command', default=ADDADMIN_CMD,
+    help='The command used to add a user to a group (default: %default).')
+
+parser.add_option(
     '--dry-run', action='store_true',
     dest='dry_run', default=False,
     help='A flag, when set, does not execute commands.')



More information about the checkins mailing list