[Checkins] SVN: zc.recipe.deployment/branches/jspaans-fix-to-match-docs/src/zc/recipe/deployment/__init__.py Initialize user during init (...)

Jasper Spaans jspaans at thehealthagency.com
Tue Dec 23 11:57:19 EST 2008


Log message for revision 94292:
  Initialize user during init (...)
  

Changed:
  U   zc.recipe.deployment/branches/jspaans-fix-to-match-docs/src/zc/recipe/deployment/__init__.py

-=-
Modified: zc.recipe.deployment/branches/jspaans-fix-to-match-docs/src/zc/recipe/deployment/__init__.py
===================================================================
--- zc.recipe.deployment/branches/jspaans-fix-to-match-docs/src/zc/recipe/deployment/__init__.py	2008-12-23 16:36:52 UTC (rev 94291)
+++ zc.recipe.deployment/branches/jspaans-fix-to-match-docs/src/zc/recipe/deployment/__init__.py	2008-12-23 16:57:18 UTC (rev 94292)
@@ -51,10 +51,11 @@
         options['logrotate-directory'] = options.get('logrotate-directory',
                                                      '/etc/logrotate.d')
 
+        options['user'] = options.get('user', pwd.getpwuid(os.getuid())[0])
+
     def install(self):
         options = self.options
-        user = options.get('user', pwd.getpwuid(os.getuid())[0])
-        uid, gid = pwd.getpwnam(user)[2:4]
+        uid, gid = pwd.getpwnam(options['user'])[2:4]
         created = []
         try:
             make_dir(options['etc-directory'], uid, gid, 0755, created)



More information about the Checkins mailing list