]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix bogus mode mask.
authorGuido van Rossum <guido@python.org>
Thu, 26 Dec 1991 13:23:22 +0000 (13:23 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 26 Dec 1991 13:23:22 +0000 (13:23 +0000)
Tools/scripts/classfix.py

index df9bed9e5fd7fb26ca44bb2c9dd037d9669bdb34..9c56a89dc920d1f0318005e5c4546d8ffbade489 100755 (executable)
@@ -137,7 +137,7 @@ def fix(filename):
        # First copy the file's mode to the temp file
        try:
                statbuf = posix.stat(filename)
-               posix.chmod(tempname, statbuf[ST_MODE] & 0x7777)
+               posix.chmod(tempname, statbuf[ST_MODE] & 07777)
        except posix.error, msg:
                err(tempname + ': warning: chmod failed (' + `msg` + ')\n')
        # Then make a backup of the original file as filename~