Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Do not change permissions on doctest sample files
Browse files Browse the repository at this point in the history
  • Loading branch information
vbraun committed Mar 1, 2015
1 parent fcbc588 commit a173e92
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/sage/repl/rich_output/buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ def _chmod_readonly(cls, filename):
0
"""
import os
from sage.env import SAGE_EXTCODE
filename = os.path.abspath(filename)
if filename.startswith(os.path.abspath(SAGE_EXTCODE)):
# Do not change permissions on the sample rich output
# files, as it will cause trouble when upgrading Sage
return
import stat
mode = os.stat(filename).st_mode
mode = stat.S_IMODE(mode) & ~(stat.S_IWUSR | stat.S_IWGRP | stat.S_IWOTH)
Expand Down

0 comments on commit a173e92

Please sign in to comment.