diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2002-01-31 22:08:38 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2002-01-31 22:08:38 (GMT) |
commit | b24231e088ad8c0b99ded3294dc0b1f4c671d38b (patch) | |
tree | c1d3dab4a755c9e0aa39216c0f867d50e40ce999 /Lib/distutils | |
parent | 2544f51036c51d87be53f6a5e35e867c8333378a (diff) | |
download | cpython-b24231e088ad8c0b99ded3294dc0b1f4c671d38b.zip cpython-b24231e088ad8c0b99ded3294dc0b1f4c671d38b.tar.gz cpython-b24231e088ad8c0b99ded3294dc0b1f4c671d38b.tar.bz2 |
Restrict the mode to the lowest four octal positions; higher positions
contain the type of the file (regular file, socket, link, &c.).
This means that install_scripts will now print
"changing mode of <file> to 775" instead of "... to 100775".
2.2 bugfix candidate, I suppose, though this isn't actually fixing a bug.
Diffstat (limited to 'Lib/distutils')
-rw-r--r-- | Lib/distutils/command/install_scripts.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/distutils/command/install_scripts.py b/Lib/distutils/command/install_scripts.py index 3bc23e7..d4cbaa3 100644 --- a/Lib/distutils/command/install_scripts.py +++ b/Lib/distutils/command/install_scripts.py @@ -50,7 +50,7 @@ class install_scripts (Command): if self.dry_run: self.announce("changing mode of %s" % file) else: - mode = (os.stat(file)[ST_MODE]) | 0111 + mode = ((os.stat(file)[ST_MODE]) | 0111) & 07777 self.announce("changing mode of %s to %o" % (file, mode)) os.chmod(file, mode) |