Skip to content
Snippets Groups Projects
Commit 9c194263 authored by Augie Fackler's avatar Augie Fackler
Browse files

setup: hide octal literals inside strings so they're portable (issue4554)

parent 6b54f749
No related branches found
No related tags found
No related merge requests found
......@@ -408,5 +408,5 @@
# Persist executable bit (apply it to group and other if user
# has it)
if st[stat.ST_MODE] & stat.S_IXUSR:
setmode = 0755
setmode = int('0755', 8)
else:
......@@ -412,7 +412,8 @@
else:
setmode = 0644
os.chmod(dst, (stat.S_IMODE(st[stat.ST_MODE]) & ~0777) |
setmode)
setmode = int('0644', 8)
m = stat.S_IMODE(st[stat.ST_MODE])
m = (m & ~int('0777', 8)) | setmode
os.chmod(dst, m)
file_util.copy_file = copyfileandsetmode
try:
install_lib.run(self)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment