Skip to content

Commit a173e92

Browse files
committed
Do not change permissions on doctest sample files
1 parent fcbc588 commit a173e92

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/sage/repl/rich_output/buffer.py

+6
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,12 @@ def _chmod_readonly(cls, filename):
131131
0
132132
"""
133133
import os
134+
from sage.env import SAGE_EXTCODE
135+
filename = os.path.abspath(filename)
136+
if filename.startswith(os.path.abspath(SAGE_EXTCODE)):
137+
# Do not change permissions on the sample rich output
138+
# files, as it will cause trouble when upgrading Sage
139+
return
134140
import stat
135141
mode = os.stat(filename).st_mode
136142
mode = stat.S_IMODE(mode) & ~(stat.S_IWUSR | stat.S_IWGRP | stat.S_IWOTH)

0 commit comments

Comments
 (0)