[Python-checkins] CVS: python/dist/src/Lib/distutils/command install_scripts.py,1.10,1.11
A.M. Kuchling
akuchling@users.sourceforge.net
Thu, 31 Jan 2002 14:08:42 -0800
Update of /cvsroot/python/python/dist/src/Lib/distutils/command
In directory usw-pr-cvs1:/tmp/cvs-serv28209
Modified Files:
install_scripts.py
Log Message:
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.
Index: install_scripts.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/install_scripts.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** install_scripts.py 2000/09/30 18:27:54 1.10
--- install_scripts.py 2002/01/31 22:08:38 1.11
***************
*** 51,55 ****
self.announce("changing mode of %s" % file)
else:
! mode = (os.stat(file)[ST_MODE]) | 0111
self.announce("changing mode of %s to %o" % (file, mode))
os.chmod(file, mode)
--- 51,55 ----
self.announce("changing mode of %s" % file)
else:
! mode = ((os.stat(file)[ST_MODE]) | 0111) & 07777
self.announce("changing mode of %s to %o" % (file, mode))
os.chmod(file, mode)