[Checkins] SVN: cipher.googlepam/trunk/ Add a space after the prompt.

Marius Gedminas cvs-admin at zope.org
Mon Oct 8 12:20:21 UTC 2012


Log message for revision 127929:
  Add a space after the prompt.
  
  Use a separate config file for tests, comment out the
  domain/username/password options in the example config file so we don't
  bother Google asking for example.com credentials.

Changed:
  U   cipher.googlepam/trunk/CHANGES.txt
  U   cipher.googlepam/trunk/src/cipher/googlepam/addusers.py
  U   cipher.googlepam/trunk/src/cipher/googlepam/googlepam.conf
  U   cipher.googlepam/trunk/src/cipher/googlepam/pam_google.py
  A   cipher.googlepam/trunk/src/cipher/googlepam/tests/googlepam.conf
  U   cipher.googlepam/trunk/src/cipher/googlepam/tests/test_doc.py
  U   cipher.googlepam/trunk/versions.cfg

-=-
Modified: cipher.googlepam/trunk/CHANGES.txt
===================================================================
--- cipher.googlepam/trunk/CHANGES.txt	2012-10-07 16:20:37 UTC (rev 127928)
+++ cipher.googlepam/trunk/CHANGES.txt	2012-10-08 12:20:16 UTC (rev 127929)
@@ -4,7 +4,7 @@
 1.4.0 (unreleased)
 ------------------
 
-- ...
+- Add a space after the prompt.
 
 1.3.0 (2012-04-24)
 ------------------
@@ -25,7 +25,7 @@
 1.2.0 (2012-04-17)
 ------------------
 
-- Do not fail. if the username already exists.
+- Do not fail if the username already exists.
 
 1.1.0 (2012-04-17)
 ------------------

Modified: cipher.googlepam/trunk/src/cipher/googlepam/addusers.py
===================================================================
--- cipher.googlepam/trunk/src/cipher/googlepam/addusers.py	2012-10-07 16:20:37 UTC (rev 127928)
+++ cipher.googlepam/trunk/src/cipher/googlepam/addusers.py	2012-10-08 12:20:16 UTC (rev 127929)
@@ -18,8 +18,7 @@
 import sys
 
 from gdata.apps.groups.service import GroupsService
-from gdata.apps.service import AppsService, AppsForYourDomainException
-from gdata.service import BadAuthentication, CaptchaRequired
+from gdata.apps.service import AppsService
 
 parser = optparse.OptionParser()
 parser.usage = '%prog [options]'

Modified: cipher.googlepam/trunk/src/cipher/googlepam/googlepam.conf
===================================================================
--- cipher.googlepam/trunk/src/cipher/googlepam/googlepam.conf	2012-10-07 16:20:37 UTC (rev 127928)
+++ cipher.googlepam/trunk/src/cipher/googlepam/googlepam.conf	2012-10-08 12:20:16 UTC (rev 127929)
@@ -1,10 +1,11 @@
 [googlepam]
-domain=example.com
-admin-username=admin
-admin-password=good-pwd
-group=group1
+##domain=example.com
+##admin-username=admin
+##admin-password=good-pwd
+##group=group1
 excludes = root
-prompt = Cipher Password:
+prompt = Google Password:
+#cache = file
 #cache = memcache
 
 [file-cache]

Modified: cipher.googlepam/trunk/src/cipher/googlepam/pam_google.py
===================================================================
--- cipher.googlepam/trunk/src/cipher/googlepam/pam_google.py	2012-10-07 16:20:37 UTC (rev 127928)
+++ cipher.googlepam/trunk/src/cipher/googlepam/pam_google.py	2012-10-08 12:20:16 UTC (rev 127929)
@@ -196,7 +196,7 @@
         if self.pamh.authtok == None:
             LOG.debug('No auth token was found. Starting conversation.')
             msg = self.pamh.Message(
-                self.pamh.PAM_PROMPT_ECHO_OFF, self.password_prompt)
+                self.pamh.PAM_PROMPT_ECHO_OFF, self.password_prompt + ' ')
             response = self.pamh.conversation(msg)
             self.pamh.authtok = response.resp
             LOG.debug('Got password: %s', self.pamh.authtok)

Copied: cipher.googlepam/trunk/src/cipher/googlepam/tests/googlepam.conf (from rev 125278, cipher.googlepam/trunk/src/cipher/googlepam/googlepam.conf)
===================================================================
--- cipher.googlepam/trunk/src/cipher/googlepam/tests/googlepam.conf	                        (rev 0)
+++ cipher.googlepam/trunk/src/cipher/googlepam/tests/googlepam.conf	2012-10-08 12:20:16 UTC (rev 127929)
@@ -0,0 +1,46 @@
+[googlepam]
+domain=example.com
+admin-username=admin
+admin-password=good-pwd
+group=group1
+excludes = root
+prompt = Cipher Password:
+
+[file-cache]
+file = user-cache
+lifespan = 1800
+
+[memcache-cache]
+key-prefix = googlepam.
+host = 127.0.0.1
+port = 11211
+debug = true
+lifespan = 1800
+
+[loggers]
+keys = root, pam
+
+[logger_root]
+handlers = stdout
+level = INFO
+
+[logger_pam]
+qualname = cipher.googlepam.PAM
+handlers = stdout
+propagate = 0
+level = INFO
+
+[handlers]
+keys = stdout
+
+[handler_stdout]
+class = StreamHandler
+args = (sys.stdout,)
+level = INFO
+formatter = simple
+
+[formatters]
+keys = simple
+
+[formatter_simple]
+format = %(levelname)s - %(message)s

Modified: cipher.googlepam/trunk/src/cipher/googlepam/tests/test_doc.py
===================================================================
--- cipher.googlepam/trunk/src/cipher/googlepam/tests/test_doc.py	2012-10-07 16:20:37 UTC (rev 127928)
+++ cipher.googlepam/trunk/src/cipher/googlepam/tests/test_doc.py	2012-10-08 12:20:16 UTC (rev 127929)
@@ -329,10 +329,13 @@
     pam_google.GooglePAM.AppsService = FakeAppsService
     test.orig_GroupsService = pam_google.GooglePAM.GroupsService
     pam_google.GooglePAM.GroupsService = FakeGroupsService
+    conf_file = os.path.join(os.path.dirname(__file__), 'googlepam.conf')
+    pam_google.parser.set_default('config_file', conf_file)
 
 def tearDown(test):
     pam_google.GooglePAM.AppsService = test.orig_AppsService
     pam_google.GooglePAM.GroupsService = test.orig_GroupsService
+    pam_google.parser.set_default('config_file', pam_google.DEFAULT_CONFIG)
 
 def test_suite():
     return doctest.DocTestSuite(

Modified: cipher.googlepam/trunk/versions.cfg
===================================================================
--- cipher.googlepam/trunk/versions.cfg	2012-10-07 16:20:37 UTC (rev 127928)
+++ cipher.googlepam/trunk/versions.cfg	2012-10-08 12:20:16 UTC (rev 127929)
@@ -161,3 +161,6 @@
 # Required by:
 # cipher.googlepam==1.2.0
 python-memcached = 1.48
+
+# Added by Buildout Versions at 2012-10-08 13:41:07.222000
+distribute = 0.6.24



More information about the checkins mailing list