Message22789
Tools/scripts/reindent.py strips execute permission
from its target file.
If the tool detects that changes need to be made, then
the target file is renamed to its original name +
'.bak', then a new file is created with the original
file's name and its whitespace-modified contents. No
manipulation of the new file's permissions is done, so
it ends up with the default for the user's umask.
This makes reindent.py annoying to run in an automated
fashion, if you rely on execute permission.
The fix is trivial, except for portability. Here's the
Posix-only version:
+ if os.name == "posix":
+ mode = os.stat(bak).st_mode
+ os.chmod(file, mode)
Patch available upon request. |
|
Date |
User |
Action |
Args |
2007-08-23 14:26:55 | admin | link | issue1050828 messages |
2007-08-23 14:26:55 | admin | create | |
|