Commit 3a74d748 authored by Lennart Regebro's avatar Lennart Regebro

Some calls to os.system('chmod') has been replaced with the more portable...

Some calls to os.system('chmod') has been replaced with the more portable os.chmod() call, to make install work properly on Windows.
parent 11f15d49
...@@ -17,6 +17,9 @@ Zope Changes ...@@ -17,6 +17,9 @@ Zope Changes
- The ZEO unit tests and wo_pcgi.py didn't run on Windows if the path - The ZEO unit tests and wo_pcgi.py didn't run on Windows if the path
to the python executable included a space. to the python executable included a space.
- Some calls to os.system('chmod') has been replaced with the more
portable os.chmod() call, to make install work properly on Windows.
Zope 2.6.1 beta 2 Zope 2.6.1 beta 2
......
...@@ -48,8 +48,7 @@ def ch(path, user, group, mode=0600, quiet=0): ...@@ -48,8 +48,7 @@ def ch(path, user, group, mode=0600, quiet=0):
if user: if user:
do("chown %s %s" % (user, path), 0, quiet) do("chown %s %s" % (user, path), 0, quiet)
do("chmod %s %s" % (oct(mode), path), 0, quiet) os.chmod(path, mode)
def make(*args): def make(*args):
print print
......
...@@ -39,7 +39,7 @@ for all necessary information. The available options are: ...@@ -39,7 +39,7 @@ for all necessary information. The available options are:
information in (usually "inituser" or "access"). information in (usually "inituser" or "access").
""" """
__version__='$Revision: 1.18 $ '[11:-2] __version__='$Revision: 1.19 $ '[11:-2]
import sys, sha, binascii, random, getopt, getpass, os import sys, sha, binascii, random, getopt, getpass, os
...@@ -80,7 +80,7 @@ def write_generated_password(home, ac_path, username): ...@@ -80,7 +80,7 @@ def write_generated_password(home, ac_path, username):
pw = pw + random.choice(pw_choices) pw = pw + random.choice(pw_choices)
acfile.write('%s:%s' % (username, generate_passwd(pw, 'SHA'))) acfile.write('%s:%s' % (username, generate_passwd(pw, 'SHA')))
acfile.close() acfile.close()
os.system('chmod 644 %s' % ac_path) os.chmod(ac_path, 644)
return pw return pw
def write_access(home, user='', group=''): def write_access(home, user='', group=''):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment